1.子元素范围选择 举例
.iconList_wr li:nth-child(n + 1):nth-child(-n + 4) { margin-right: 0.6rem;}.iconList_wr li:nth-child(5) { margin-left: 1.04rem;}.iconList_wr li:nth-child(n + 4) ~ li { margin-right: 0.6rem; margin-top: 0.4rem;}
本文共 291 字,大约阅读时间需要 1 分钟。
1.子元素范围选择 举例
.iconList_wr li:nth-child(n + 1):nth-child(-n + 4) { margin-right: 0.6rem;}.iconList_wr li:nth-child(5) { margin-left: 1.04rem;}.iconList_wr li:nth-child(n + 4) ~ li { margin-right: 0.6rem; margin-top: 0.4rem;}
转载于:https://www.cnblogs.com/tongbiao/p/9473367.html