最初とか最後とかXの倍数とかありきたりのは割愛。
最後からX番目
:nth-last-child(X)
ある要素の最後からX番目
:nth-last-of-type(X)
X番目以降(X番目から最後まで)
:nth-child(n+X)
ある要素のX番目以降(X番目から最後まで)
:nth-of-type(n+X)
X番目以前(最初からX番目まで)
:nth-child(-n+X)
ある要素のX番目以前(最初からX番目まで)
:nth-of-type(-n+X)
最後からX個
:nth-last-child(-n+X)
ある要素の最後からX個
:nth-last-of-type(-n+X)
最後からX番目以前
:nth-last-child(n+X)
ある要素の最後からX番目以前
:nth-last-of-type(n+X)