메뉴 건너뛰기

본문시작

2019.05.18 09:28

css 선택자(selector)

조회 수 40 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form

No Attached Image

nth-child(), nth-last-child()

-두 선택자는 특정순서가 있는 요소에 사용
-:nth-child()는 앞에서부터 세고 :nth-last-child()는 뒤에서부터 셈
-인터넷 익스플로러 ie9 버전 사용 가능

1) nth-child()

-형제요소중 특정 순서에 있는 요소에 사용

-문법 : nth-child(an+b)

a와 b는 정수이며 n에는 0부터 차례대로 대입됨 
an+b에는 even,odd로 대체할 수 있음,even은 작수요소 odd는 홀수요소가 선택
b로만 사용가능

2) nth-last-child()

 -문법 : nth-last-child(an+b)

nth-child와는 다르게 뒤에서 부터 계산

nth-child와 같이 even,odd 사용



쌓자지식

지식공유

  1. '아시안 플러시'란?

    Date2019.09.27 By어푸 Reply0 Views70 file
    Read More
  2. 양복 맞춤 꿀팁

    Date2019.09.23 By잘생긴것들이란 Reply0 Views45 file
    Read More
  3. 피로를 풀어주는 마사지 방법

    Date2019.09.04 By어푸 Reply0 Views52 file
    Read More
  4. 17금) 구글로 av 정복해보자

    Date2019.08.20 By엄마가보고있다 Reply0 Views85 file
    Read More
  5. 페이스북의 가상화폐 리브라

    Date2019.07.01 By어푸 Reply0 Views53 file
    Read More
  6. 자사고의 뜻

    Date2019.06.21 By잘생긴것들이란 Reply0 Views91 file
    Read More
  7. 옥시법?살생물제법?박나래 향초 사건

    Date2019.06.11 By어푸 Reply0 Views124 file
    Read More
  8. css 선택자(selector)

    Date2019.05.18 By흐미 Reply0 Views40
    Read More
  9. css position 속성에 대해 알아보자.중앙정렬

    Date2019.05.16 By흐미 Reply0 Views59
    Read More
  10. 문빠, 달창이 도대체 뭐지?

    Date2019.05.13 By해바라기찡 Reply0 Views47 file
    Read More
  11. 패스트트랙,사보임의 뜻이 모임?

    Date2019.04.26 By엄마가보고있다 Reply0 Views47
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5