css- 范围选择

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.tongbiao.xyz/
原文地址:https://www.cnblogs.com/tongbiao/p/9473367.html