73 lines
1.2 KiB
CSS
73 lines
1.2 KiB
CSS
/*首页文章列表样式表*/
|
|
.article-list {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
|
|
gap: 30px;
|
|
}
|
|
|
|
.article-card {
|
|
background-color: #fff;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
transition: transform 0.3s, box-shadow 0.3s;
|
|
}
|
|
|
|
.article-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.article-content {
|
|
display: flex;
|
|
padding: 20px;
|
|
}
|
|
|
|
.article-image {
|
|
width: 200px;
|
|
height: 150px;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.article-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.article-info {
|
|
flex-grow: 1;
|
|
padding-left: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.article-title {
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
margin-bottom: 10px;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.article-title:hover {
|
|
color: #3498db;
|
|
}
|
|
|
|
.article-meta {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: 15px;
|
|
color: #999;
|
|
font-size: 14px;
|
|
}
|
|
|
|
|
|
|
|
.meta-data {
|
|
display: flex;
|
|
gap: 20px;
|
|
} |