兒童偽類

“: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)