LoginSignup
0
0

More than 1 year has passed since last update.

X番目系のCSSまとめ

Posted at

最初とか最後とか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)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0