[CSS] 14. Lists ( 리μ€νΈ, λͺ©λ‘ )
μ΄λ²μλ λͺ©λ‘κ³Ό κ΄λ ¨λ CSSμμ±μ λν΄μ μμ보λλ‘ νκ² μ΅λλ€.
μ°μ μ΄λ€ μμ±λ€μ΄ μλμ§ κ·Έλλ€μ μ΄λ¦λΆν° νλ² μ΄ν΄λ΄ μλ€.
list-style-type μ΄κ±΄ λͺ©λ‘ μ€νμΌ, μλ₯Ό λ€λ©΄ μ«μ, μλ¬Έ, λκ·ΈλΌλ―Έ, μ¬κ°ν , λ μ΄λ° κ²λ€μ μ€μ νλ μμ±μ λλ€.
list-style-position μ΄κ±΄ λͺ©λ‘μ΄ μΈλ΄νΈ λμ΄μΌ νλμ§λ₯Ό κ²°μ νλ μμ±μ λλ€. νμ λͺ©λ‘μ΄λ μλλ λ μ΄λ°κ±°μ£ .
list-style-image λͺ©λ‘ μμ μ΄λ―Έμ§λ₯Ό 보μ¬μ£Όκ² λ€λ κ²λλ€. λ¨μν μ«μλͺ©λ‘μ΄λ κΈ°νΈλͺ©λ‘μ΄ μ«λ€λ©΄ μ΄κ±Έ μΈ μλ μκ² λ€μ.
list-style λͺ©λ‘ κ΄λ ¨ μ€νμΌμ νκΊΌλ²μ μ μν μ μκ² ν΄μ£Όλ μμ±μ΄μ£ .
marker-offset λͺ©λ‘μμ λ§μ»€(μ«μ, λκΈλΌλ―Έ λ±λ±)μ ν μ€νΈ μ¬μ΄μ κ°κ²©μ κ²°μ μ§λ μμ±μ λλ€.
μ΄μ κ° μμ±λ€μ μ΄λ»κ² μ¬μ©νλμ§ μμ λ₯Ό νλ² λ³ΌκΉμ??
The list-style-type Property:
list-style-type μμ±μ λ λͺ©λ‘μ 보μ¬μ§λ λ§μ»€μ μ€νμΌμ λ³κ²½νκΈ°μν μμ±μ λλ€.
λͺ©λ‘μλ ν¬κ² μμμλ λͺ©λ‘κ³Ό μμμλ λͺ©λ‘μ΄ μμ£ .
λ€μμ μμμλ λͺ©λ‘μμ μ¬μ©ν μ μλ list-style-typeμ μμ±κ°μ λλ€.
Value | Description |
---|---|
none | NA |
disc (default) | A filled-in circle |
circle | An empty circle |
square | A filled-in square |
λ€μμ μμμλ λͺ©λ‘μμ μ¬μ©λλ μμ±κ°μ λλ€.
Value | Description | Example |
---|---|---|
decimal | Number | 1,2,3,4,5 |
decimal-leading-zero | 0 before the number | 01, 02, 03, 04, 05 |
lower-alpha | Lowercase alphanumeric characters | a, b, c, d, e |
upper-alpha | Uppercase alphanumeric characters | A, B, C, D, E |
lower-roman | Lowercase Roman numerals | i, ii, iii, iv, v |
upper-roman | Uppercase Roman numerals | I, II, III, IV, V |
lower-greek | The marker is lower-greek | alpha, beta, gamma |
lower-latin | The marker is lower-latin | a, b, c, d, e |
upper-latin | The marker is upper-latin | A, B, C, D, E |
hebrew | The marker is traditional Hebrew numbering | |
armenian | The marker is traditional Armenian numbering | |
georgian | The marker is traditional Georgian numbering | |
cjk-ideographic | The marker is plain ideographic numbers | |
hiragana | The marker is hiragana | a, i, u, e, o, ka, ki |
katakana | The marker is katakana | A, I, U, E, O, KA, KI |
hiragana-iroha | The marker is hiragana-iroha | i, ro, ha, ni, ho, he, to |
katakana-iroha | The marker is katakana-iroha | I, RO, HA, NI, HO, HE, TO |
μμ λ₯Ό νλ² λ³ΌκΉμ.
<ul style="list-style-type:circle;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ul style="list-style-type:square;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ol style="list-style-type:decimal;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> <ol style="list-style-type:lower-alpha;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> <ol style="list-style-type:lower-roman;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
|
The list-style-position Property:
list-style-position μμ±μ bullet pointλ₯Ό ν¬ν¨νλ λ°μ€μ λ΄λΆ λλ μΈλΆμ μμΉλ₯Ό μ§μ νλ μμ±μ λλ€.
Value | Description |
---|---|
none | NA |
inside | If the text goes onto a second line, the text will wrap underneath the marker. It will also appear indented to where the text would have started if the list had a value of outside. |
outside | If the text goes onto a second line, the text will be aligned with the start of the first line (to the right of the bullet). |
λ€μ μμ λ₯Ό 보μμ£ .
<ul style="list-style-type:circle; list-stlye-position:outside;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ul style="list-style-type:square;list-style-position:inside;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ol style="list-style-type:decimal;list-stlye-position:outside;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> <ol style="list-style-type:lower-alpha;list-style-position:inside;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
|
The list-style-image Property:
list-style-image μμ±μ μμμ λ§μλλ¦° κ²μ²λΌ μ΄λ―Έμ§ νμΌμ μμ€λ‘ μ§μ νμ¬ λͺ©λ‘μ λ§μ»€λ‘ μ¬μ©ν μ μκ²λ ν΄μ£Όλ μμ±μ λλ€.
λ€μ μμ λ₯Ό 보μμ£ .
<ul> <li style="list-style-image: url(/images/bullet.gif);">Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ol> <li style="list-style-image: url(/images/bullet.gif);">Maths</li> <li>Social Science</li> <li>Physics</li> </ol> |
κ²°κ³Όλ μλμ κ°μ΅λλ€. ( urlμ μ΄λ€ μ΄λ―Έμ§ μμ€μ κ²½λ‘κ° λ€μ΄κ°λλμ λ°λΌ λ¬λΌμ§λ κ²°κ³Όμ λλ€. )
|
The list-style Property:
λ€μ μμ λ₯Ό 보μμ£ .
<ul style="list-style: inside square;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ol style="list-style: outside upper-alpha;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
|
The marker-offset Property:
μ΄ μμ±μ IE 6, Netscape 7 μ΄νμμλ μ§μνμ§ μλλ€λκ΅°μ.
μμ λ₯Ό λ΄ μλ€.
<ul style="list-style: inside square; marker-offset:2em;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ul> <ol style="list-style: outside upper-alpha; marker-offset:2cm;"> <li>Maths</li> <li>Social Science</li> <li>Physics</li> </ol> |
κ²°κ³Όλ μλμ κ°μ΅λλ€.
|
Reference : http://www.tutorialspoint.com/css/css_lists.htm