์ด๋ฒ์๋ ๋ชฉ๋ก๊ณผ ๊ด๋ จ๋ 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
'๐ป Programming > CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[CSS] 16. Cursor ( ๋ง์ฐ์ค ์ปค์ ๋ชจ์ ) (0) | 2016.06.12 |
---|---|
[CSS] 15. Paddings ( ํจ๋ฉ ) (0) | 2016.06.12 |
[CSS] 13. Margins ( ๋ง์ง, ์ฌ๋ฐฑ ) (0) | 2016.06.12 |
[CSS] 12. Borders ( ํ ๋๋ฆฌ, ๋ณด๋ ์ค์ ) (0) | 2016.06.12 |
[CSS] 11. Table ( ํ ์ด๋ธ ์ค์ ) (0) | 2016.06.12 |