css3选择器——:nth-of-type的测试
2016-08-11 18:37
417 查看
css3 对选择器提出了很多新的用法,实际的应用更加灵活!这里主要记录nth-of-type选择器的用法。
nth-of-type选择器
This is the first paragraph
This is the second paragraph
This is the third paragraph
→nth-of-type选择器的索引起始值是数值1,而不是零
效果图
nth-of-type选择器
This is the first paragraph
This is the second paragraph
This is the third paragraph
→nth-of-type选择器的索引起始值是数值1,而不是零
Conclusion
:nth-of-type(n)选择器匹配类型中的第n个同级兄弟元素,n可以是一个数字,一个关键字或者一个公式。效果图
相关文章推荐
- css3中nth-child选择器和nth-of-type选择器的区别
- CSS3选择器:nth-child和:nth-of-type之间的差异
- 【CSS3】nth-of-type(n)选择器
- css3 - 选择器first-child、last-child、nth-child、nth-last-child、nth-of-type
- CSS3---nth-of-type(n)选择器
- CSS3选择器:nth-child和:nth-of-type之间的差异
- CSS3选择器之nth-of-type
- 【CSS3】---first-of-type选择器+nth-of-type(n)选择器
- 【CSS3】nth-last-of-type(n)选择器
- 【CSS3】---last-of-type选择器+nth-last-of-type(n)选择器
- 【CSS3】---last-of-type选择器+nth-last-of-type(n)选择器
- CSS3选择器:nth-child和:nth-of-type之间的差异
- 【CSS3】---last-of-type选择器+nth-last-of-type(n)选择器
- CSS3选择器:nth-child和:nth-of-type之间的差异
- 【CSS3】---last-of-type选择器+nth-last-of-type(n)选择器
- 【CSS3】---first-of-type选择器+nth-of-type(n)选择器
- [css3]CSS3选择器:nth-child和:nth-of-type之间的差异
- 【CSS3】---first-of-type选择器+nth-of-type(n)选择器
- CSS3的nth-child() 和nth-of-type()选择器,表格奇偶行变色