CSS nth-child() 셀렉터

Jmnote bot (토론 | 기여)님의 2017년 6월 27일 (화) 00:59 판 (봇: 자동으로 텍스트 교체 (-==참고 자료== +==참고==))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

CSS nth-child() Selector
CSS nth-child() 셀렉터

2 예시[ | ]

<style>
span:nth-child(1) { background: yellow; }
span:nth-child(2) { color: red; }
span:nth-child(3) { background: pink; }
</style>

<div>
    <span>박스1</span>
    <span>박스2</span>
    <span>박스3</span>
    <span>박스4</span>
</div>
<div>
    <p>안녕</p>
    <span>박스1</span>
    <span>박스2</span>
    <span>박스3</span>
    <span>박스4</span>
</div>

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}