对于p:nth-child
选择器,选择一个元素如果:
- 这是个段落元素
- 这是父标签的第二个子元素
对于p:nth-of-type
选择器,选择一个元素如果:
- 选择父标签的第二个段落子元素
:nth-of-type
选择器,限制条件少
CSS3选择器:nth-child和:nth-of-type之间的差异
原文地址:http://www.cnblogs.com/sunxirui00/p/7560461.html
对于p:nth-child
选择器,选择一个元素如果:
对于p:nth-of-type
选择器,选择一个元素如果:
:nth-of-type
选择器,限制条件少
CSS3选择器:nth-child和:nth-of-type之间的差异
原文地址:http://www.cnblogs.com/sunxirui00/p/7560461.html