mirror of
https://gitee.com/ulthon/layui-ul.git
synced 2026-07-08 05:12:48 +08:00
新增文章块列表组件
This commit is contained in:
65
source/components/list/ul-post-block-list/_index.scss
Normal file
65
source/components/list/ul-post-block-list/_index.scss
Normal file
@@ -0,0 +1,65 @@
|
||||
.ul-post-block-list {
|
||||
|
||||
$spaceSize: 8px;
|
||||
$colCount: 3;
|
||||
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
margin: -$spaceSize;
|
||||
|
||||
|
||||
|
||||
|
||||
.ul-post-block-item {
|
||||
margin: $spaceSize;
|
||||
width: calc((100%/$colCount) - $spaceSize * 2);
|
||||
align-self: normal;
|
||||
|
||||
&:hover {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.poster {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
color: #333;
|
||||
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
padding: 0 6px 6px 6px;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
&.fixed-height {
|
||||
.ul-post-block-item {
|
||||
.title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.desc {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user