CSS3 :nth-last-child伪类

来源:http://itssh.cn/post/930.html

CSS3 :nth-last-child(n) 选择器匹配属于其元素的第 N 个子元素的每个元素,不论元素的类型,从最后一个子元素开始计数。可以统计如果dom元素个数超过4个就添加其他样式。

案例:







CSS3 :nth-last-child伪类





    
  • 1
  • 2
  • 3
  • 4

效果:


QQ截图20161019184240.png

来源:http://itssh.cn/post/930.html

你可能感兴趣的:(CSS3 :nth-last-child伪类)