儿童伪类

“:nth-​​child(an + b)CSS 伪类匹配在文档树中具有+ b-1 兄弟的元素,对于 n” - MDN:nth-​​child 的给定正值或零值

伪选择 1 2 3 4 6 7 8 9 10
:first-child
:nth-child(3)
:nth-child(n+3)
:nth-child(3n)
:nth-child(3n+1)
:nth-child(-n+3)
:nth-child(odd)
:nth-child(even)
:last-child
:nth-last-child(3)