css中nth-child的使用注意
2019-05-20 21:51
1731 查看
代码:
总结:
item:nth-child(2)是什么意思,选择的是什么元素?
它的意思是:首先选中的元素必须要具有.item类名,并且该元素是某一个元素的第二个子元素
所以我们看到上面是第二个图形变红色
:nth-child(n),其中的n填入的是.item在兄弟元素中排的索引,
而不是针对具有.item类名的几个兄弟元素中的索引,注意n是从1开始
相关文章推荐
- CSS3伪类选择器:nth-child(n)及:nth-of-type(n)使用区别探究总结
- css伪类:nth-child(an+b) 使用说明
- CSS的nth-child使用方法
- css中合理的使用nth-child实现布局
- 使用css属性:nth-child(n)匹配选择第n个子元素
- CSS3 :nth-child(n)使用注意
- CSS3 :nth-child(n)使用注意
- CSS中nth-child和nth-of-type的简单使用
- CSS nth-child、first-child、last-child、nth-of-type、first-of-type和last-of-type选择器使用
- Jquery下:nth-child(an+b)的使用注意
- CSS nth-child、first-child、last-child、nth-of-type、first-of-type和last-of-type选择器使用
- css中合理的使用nth-child实现布局
- Jquery下:nth-child(an+b)的使用注意
- cSS3 伪类:nth-child 的使用方法
- 使用CSS3 :nth-child(n) 選取器教學
- CSS高级选择器:nth-child()应用大全
- td nowrap css nowrap使用说明于注意事项
- CSS :nth-child与:nth-of-type选择器
- CSS3伪类选择器:nth-child()
- javascript 中使用css应该注意的: