标签:inf ie浏览器 nbsp 标签 等于 n+1 strong 图片 eve
下面我将用几个典型的实例来给大家讲解:nth-child的实际用途:
Tips:还用低版本的IE浏览器的哥们请绕过!
.demo01 li:nth-child(2){background:#090}
:nth-child(n+4)选取大于等于4标签,“n”表示从整数,下同
.demo01 li:nth-child(n+4){background:#090}
:nth-child(-n+4)选取小于等于4标签
.demo01 li:nth-child(-n+4){background:#090}
.demo01 li:nth-child(2n){background:#090}
.demo01 li:nth-child(2n-1){background:#090}
.demo01 li:nth-child(3n+1){background:#090}
.demo01 li:last-child{background:#090}
.demo01 li:nth-last-child(3){background:#090}
标签:inf ie浏览器 nbsp 标签 等于 n+1 strong 图片 eve
原文地址:https://www.cnblogs.com/guozh/p/10161623.html