"CSS 셀렉터 n번째부터 전체 선택"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(사용자 2명의 중간 판 11개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;CSS select all items from n-th item
;CSS select all items from nth item
;CSS 셀렉터 n번째부터 전체 선택
;CSS 셀렉터 n번째부터 전체 선택


<source lang='html'>
<syntaxhighlight lang='html' run outheight='300'>
<style>
<style>
li:nth-child(n+4) { color: red; }
li:nth-child(n+4) { color: red; }
21번째 줄: 21번째 줄:
   <li>십자가</li>
   <li>십자가</li>
</ol>
</ol>
</source>
</syntaxhighlight>
<jsfiddle>k69hyqtv</jsfiddle>


==참고 자료==
==같이 보기==
* [[CSS nth-child()]]
* [[CSS nth-of-type()]]
 
==참고==
* https://css-tricks.com/forums/topic/select-all-items-after-10th-item/
* https://css-tricks.com/forums/topic/select-all-items-after-10th-item/


[[분류: CSS 셀렉터]]
[[분류: CSS 셀렉터]]

2021년 12월 27일 (월) 19:32 기준 최신판

1 개요[ | ]

CSS select all items from nth item
CSS 셀렉터 n번째부터 전체 선택
<style>
li:nth-child(n+4) { color: red; }
li:nth-of-type(n+8) { background: yellow; }
</style>

<ol>
  <li>한놈</li>
  <li>두시기</li>
  <li>석삼</li>
  <li>너구리</li>
  <li>오징어</li>
  <li>육개장</li>
  <li>칠면조</li>
  <li>팔보채</li>
  <li>구구단</li>
  <li>십자가</li>
</ol>

2 같이 보기[ | ]

3 참고[ | ]

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