• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

Pseudo-classes

nth-child vs nth-of-type

참고: nth-of-type은 "선택자"를 먼저 체크하고 nth-child는 (2n+1)같은 "로직"을 먼저 계산한다. (잘 모르겠으면 nth-of-type가 예상대로 동작한다) html nth-child nth-child는 로직을 먼저 계산하기 때문에 어떤 태그인지 고민하지않고 홀수인지를 먼저 선택한다. 그래서 홀수는 그래서 위처럼 이상하게 보인다. nth-of-type nth-of-typ...

Pseudo-classesCSSCSS

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more