๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

WEB

[ CSS ] list-style-type์•Œ์•„๋ณด๊ธฐ.

 

list-style์€ css์†์„ฑ ์ค‘ ํ•˜๋‚˜๋กœ, HTML์˜ ๋ชฉ๋ก ์š”์†Œ(`<ul>`, `<ol>`, `<dl>`)๋“ฑ์˜ ๋ฆฌ์ŠคํŠธ์—์„œ ๋ฆฌ์ŠคํŠธ ํ•ญ๋ชฉ๋“ค์˜ ๋งˆ์ปค(marker) ๋ชจ์–‘์„ ์ง€์ •ํ•˜๋Š” CSS ์†์„ฑ์œผ๋กœ, ํ…์ŠคํŠธ ์•ž์— ์‚ฌ์šฉ๋˜๋Š” ์ˆซ์ž, ๋ฌธ์ž, ์ด๋ฏธ์ง€ ๋“ฑ์˜ ๋งˆ์ปค ๋ชจ์–‘์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

 



`list-style-type` ์†์„ฑ์€ ๋‹ค์–‘ํ•œ ๊ฐ’์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ผ๋ฐ˜์ ์œผ๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฐ’๋“ค์ด ์‚ฌ์šฉ๋œ๋‹ค.

 

 


1. `none`

๋ชฉ๋ก ํ•ญ๋ชฉ์— ๋งˆ์ปค๋ฅผ ํ‘œ์‹œํ•˜์ง€ ์•Š๋Š”๋‹ค. ์ฆ‰, ๋ฒˆํ˜ธ๋‚˜ ๋ถˆ๋ฆฟ ๊ธฐํ˜ธ๊ฐ€ ๋‚˜ํƒ€๋‚˜์ง€ ์•Š๋Š”๋‹ค.

 

 

 

 

 

 



2. `disc`

์›ํ˜• ๋ถˆ๋ฆฟ ๊ธฐํ˜ธ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. (default)

 


3. `circle`

๋นˆ ์› ๊ธฐํ˜ธ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

 



4. `square`

๋„ค๋ชจ ์ƒ์ž ๊ธฐํ˜ธ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.



5. `decimal`

1๋ถ€ํ„ฐ ์‹œ์ž‘ํ•˜์—ฌ ์ˆซ์ž๋กœ ๋ฒˆํ˜ธ๋ฅผ ๋งค๊ธด๋‹ค.

 

 


6. `decimal-leading-zero`

01๋ถ€ํ„ฐ ์‹œ์ž‘ํ•˜์—ฌ 2์ž๋ฆฌ ์ˆซ์ž๋กœ ๋ฒˆํ˜ธ๋ฅผ ๋งค๊ธด๋‹ค. (01, 02, ..., 10, 11, ...)

 



7. `lower-roman`

์†Œ๋ฌธ์ž ๋กœ๋งˆ ์ˆซ์ž๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. (i, ii, iii, iv, ...)

 

 


8. `upper-roman`

๋Œ€๋ฌธ์ž ๋กœ๋งˆ ์ˆซ์ž๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. (I, II, III, IV, ...)

 



9. `lower-alpha`

์†Œ๋ฌธ์ž ์•ŒํŒŒ๋ฒณ์„ ์‚ฌ์šฉํ•œ๋‹ค. (a, b, c, d, ...)

 



10. `upper-alpha`

๋Œ€๋ฌธ์ž ์•ŒํŒŒ๋ฒณ์„ ์‚ฌ์šฉํ•œ๋‹ค. (A, B, C, D, ...)

 

 


11. `lower-greek`

์†Œ๋ฌธ์ž ๊ทธ๋ฆฌ์Šค ๋ฌธ์ž๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

 

 


12. `upper-greek`

๋Œ€๋ฌธ์ž ๊ทธ๋ฆฌ์Šค ๋ฌธ์ž๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.


 


์ด ์™ธ์—๋„ ๋‹ค์–‘ํ•œ ํŠน์ˆ˜ํ•œ ๋ชฉ๋ก ์Šคํƒ€์ผ์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

/* Partial list of types */
list-style-type: disc;
list-style-type: circle;
list-style-type: square;
list-style-type: decimal;
list-style-type: georgian;
list-style-type: trad-chinese-informal;
list-style-type: kannada;

/* <string> value */
list-style-type: "-";

/* Identifier matching an @counter-style rule */
list-style-type: custom-counter-style;

/* Keyword value */
list-style-type: none;

/* Global values */
list-style-type: inherit;
list-style-type: initial;
list-style-type: revert;
list-style-type: revert-layer;
list-style-type: unset;

 

 

 

 


 

๐ŸŒธ ์ถœ์ฒ˜ ๐ŸŒธ

 

list-style-type - MDN