2018. 2. 2. 10:37ㆍ웹 표준 퍼블리싱 바이블
1. list-style-type으로 목록 타입 지정하기
목옥에는 <ul>과 <ol>이 있습니다. "비순차적"인 <ul> 목록은 항목 앞에 disc, circle, square 형태의 블릿(bullet) 표시가 생깁니다. "순차적"인 <ol> 목록은 각 항목 별로 숫자가 붙는데, 알파벳이나 로마숫자로 변경할 수도 있습니다. css에서는 <ul>, <ol> 관계없이 모든 형태의 블릿과 넘버가 가능합니다.
1-1. 비순차적 목록(Unordered List, ul) 타입 지정하기
<style type="text/css"> list-style-type: disc; list-style-type: circle; list-style-type: square; </style>
|
이때 지정할 대상은 개별 항목인 <li>보다는 모체에 해당하는 <ul>이나 <ol>요소에 지정하는 것이 좋습니다. 이와 같은 타입들은 각 항목을 꾸미기 위한 것이기보다 항목을 그룹화(Grouping)하려는 목적이 더 크기 때문입니다.
1-2. 순차적 목록(Ordered List, ol) 타입 지정하기
<ol>요소를 작성하면 기본값으로 10진수(Decimal)로 적용되어 "1, 2, 3, 4, 5,……"의 숫자가 붙습니다. css로는 <ul>, <ol>관계없이 적용 가능하며, 소수, 로마숫자, 그리스, 알파벳, 아르메니아, 그루지아의 넘버링 형태를 제공합니다.
<style type="text/css"> list-style-type: decimal; list-style-type: decimal-leading-zero; list-style-type: lower-roman; list-style-type: upper-roman; list-style-type: lower-greek; list-style-type: lower-alpha; list-style-type: upper-alpha; list-style-type: armenian; list-style-type: georgian; </style>
|
'웹 표준 퍼블리싱 바이블' 카테고리의 다른 글
4-6. Display 속성과 Visivility 속성 알아보기 (0) | 2018.02.06 |
---|---|
4-5. 목록(List) 스타일 - 2 (0) | 2018.02.05 |
4-4. 서체(font)와 글(text) 스타일 - 8 (0) | 2018.02.01 |
4-4. 서체(font)와 글(text) 스타일 - 7 (0) | 2018.01.31 |
4-4. 서체(font)와 글(text) 스타일 - 6 (0) | 2018.01.30 |