常用css
1、例如像淘宝商品列表,商品有多行,想单独设置最后一行的item的margin-bottom:
.goodItem是item的class名
/* 列表的最后一行margin-bottom设置为0 */
.goodItem:nth-child(3n+1):nth-last-child(-n+3),
.goodItem:nth-child(3n+1):nth-last-child(-n+3)~.goodItem{
margin-bottom: 0;
}
2、多行文本的容器,想最后一行超出部分省略号显示
原创
2020-06-12 20:08:11 ·
196 阅读 ·
0 评论