* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Microsoft YaHei", sans-serif;
background: #f8f9fa;
color: #333;
line-height: 1.7;
}
a {
color: #0d6efd;
text-decoration: none;
}
a:hover {
color: #0a58ca;
}
img {
max-width: 100%;
height: auto;
border-radius: 6px;
}
.container {
max-width: 1140px;
margin: 0 auto;
padding: 0 15px;
}
.header {
background: #fff;
padding: 20px 0;
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
margin-bottom: 30px;
}
.header-inner {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 24px;
font-weight: 700;
}
.nav ul {
list-style: none;
display: flex;
gap: 24px;
}
.nav a {
font-size: 15px;
font-weight: 500;
}
.main {
display: flex;
gap: 30px;
}
.content {
flex: 1;
}
.sidebar {
width: 300px;
}
.card {
background: #fff;
border-radius: 10px;
padding: 25px;
margin-bottom: 25px;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.title {
font-size: 20px;
margin-bottom: 12px;
line-height: 1.4;
}
.meta {
font-size: 13px;
color: #666;
margin-bottom: 15px;
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.excerpt {
color: #555;
font-size: 15px;
}
.pagination {
display: flex;
justify-content: center;
gap: 8px;
margin: 20px 0;
}
.pagination a,
.pagination span {
padding: 7px 13px;
background: #fff;
border-radius: 6px;
font-size: 14px;
}
.pagination .current {
background: #0d6efd;
color: #fff;
}
.single-title {
font-size: 26px;
margin-bottom: 15px;
}
.single-content {
margin: 30px 0;
font-size: 16px;
line-height: 1.9;
}
.single-content p {
margin-bottom: 20px;
}
.post-nav {
display: flex;
justify-content: space-between;
margin: 30px 0;
padding: 15px;
background: #f8f9fa;
border-radius: 8px;
}
.related, .like {
margin: 40px 0;
}
.related h3, .like h3 {
font-size: 18px;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #eee;
}
.related-list {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.related-item {
width: 48%;
}
.like-item {
padding: 10px 0;
border-bottom: 1px dashed #eee;
}
.comments-area {
margin-top: 40px;
}
.comment-list {
list-style: none;
margin-bottom: 30px;
}
.comment {
padding: 15px;
border-bottom: 1px solid #eee;
}
.comment-author {
font-weight: bold;
}
.comment-meta {
font-size: 12px;
color: #999;
}
.comment-body {
margin-top: 8px;
}
.comment-respond input,
.comment-respond textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ddd;
border-radius: 6px;
}
.comment-form-submit {
background: #0d6efd;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
}
.widget {
background: #fff;
padding: 20px;
border-radius: 10px;
margin-bottom: 25px;
}
.widget h3 {
font-size: 16px;
margin-bottom: 15px;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
}
.widget ul {
list-style: none;
}
.widget li {
padding: 7px 0;
border-bottom: 1px dashed #eee;
}
.tag-cloud a {
display: inline-block;
padding: 4px 8px;
background: #f1f1f1;
border-radius: 4px;
margin: 0 4px 6px 0;
font-size: 13px;
}
.link-item {
display: inline-block;
margin-right: 15px;
margin-bottom: 10px;
}
.footer {
background: #212529;
color: #fff;
text-align: center;
padding: 30px 0;
margin-top: 40px;
}
.back-top {
position: fixed;
right: 20px;
bottom: 20px;
width: 40px;
height: 40px;
background: #0d6efd;
color: #fff;
text-align: center;
line-height: 40px;
border-radius: 50%;
cursor: pointer;
display: none;
}
@media (max-width: 768px) {
.main {
flex-direction: column;
}
.sidebar {
width: 100%;
}
.related-item {
width: 100%;
}
.nav ul {
flex-wrap: wrap;
gap: 12px;
}
.post-nav {
flex-direction: column;
gap: 10px;
}
}