CSS (nth-child(n))

이인아·2025년 1월 17일
0

CSS

목록 보기
1/6

nth-child(1) == first-child
nth-last-child == 막내 자식
nth-last-child(3) == 뒤에서 세번째 자식

section > nav:nth-child(2) == section의 자식 & nav 태그 & 두번째 자식

section > :nth-child == section의 두번째 자식

section > div:nth-child(2n) == section의 자식 & div 태그 & 2의 배수의 자식

section > div:nth-child(2n-1) == section의 자식 & div 태그 & 홀수의 자식

0개의 댓글