84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
学习是最好的投资!
:nth-of-type(n)只计算父元素中指定的某种类型的子元素“n”是其参数,而且可以是整数值(1,2,3,4),也可以是表达式(2n+1、-n+5)和关键词(odd、even),但参数n的起始值始终是1,而不是0。也就是说,参数n的值为0时,选择器将选择不到任何匹配的元素。
这位大哥解释的很好,我就不搬了,自己看CSS3选择器:nth-child和:nth-of-type之间的差异
这种问题查MDN最好
https://developer.mozilla.org/zh-CN/docs/Web/CSS/:nth-of-type
CSS选择器之:nth-child(n)与:nth-last-of-type(number)
:nth-of-type(n)只计算父元素中指定的某种类型的子元素
“n”是其参数,而且可以是整数值(1,2,3,4),也可以是表达式(2n+1、-n+5)和关键词(odd、even),但参数n的起始值始终是1,而不是0。也就是说,参数n的值为0时,选择器将选择不到任何匹配的元素。
这位大哥解释的很好,我就不搬了,自己看CSS3选择器:nth-child和:nth-of-type之间的差异
这种问题查MDN最好
https://developer.mozilla.org/zh-CN/docs/Web/CSS/:nth-of-type
CSS选择器之:nth-child(n)与:nth-last-of-type(number)