CSS 2.1 快速導覽 - 符號類型 list-style-type

list-style-type 性質 (property) 為 CSS 中用來設定符號清單的符號類型,有以下的關鍵字 (keyword)

  • disc
  • circle
  • square
  • decimal
  • decimal-leading-zero
  • lower-roman
  • upper-roman
  • lower-greek
  • lower-latin
  • upper-latin
  • armenian
  • georgian
  • lower-alpha
  • upper-alpha
  • none


舉例如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
ul {
    display: inline-block;
}
 
.exampledisc {
    list-style-type: disc;
}
 
.examplecircle {
    list-style-type: circle;
}
 
.exampledisc {
    list-style-type: disc;
}
 
.examplesquare {
    list-style-type: square;
}
 
.exampledecimal {
    list-style-type: decimal;
}
 
.exampledecimalleadingzero {
    list-style-type: decimal-leading-zero;
}
 
.examplelowerroman {
    list-style-type: lower-roman;
}
 
.exampleupperroman {
    list-style-type: upper-roman;
}
 
.examplelowergreek {
    list-style-type: lower-greek;
}
 
.examplelowerlatin {
    list-style-type: lower-latin;
}
 
.exampleupperlatin {
    list-style-type: upper-latin;
}
 
.examplearmenian {
    list-style-type: armenian;
}
 
.examplegeorgian {
    list-style-type: georgian;
}
 
.exampleloweralpha {
    list-style-type: lower-alpha;
}
 
.exampleupperalpha {
    list-style-type: upper-alpha;
}
 
.examplenone {
    list-style-type: none;
}
 
/* 《程式語言教學誌》的範例程式
    檔名:list01.css
    功能:示範 CSS 2.1 樣式表的使用
    作者:張凱慶
    時間:西元 2011 年 7 月 */


我們以下面的 HTML 文件載入
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html>
<head>
<title>網頁標題</title>
<link rel="stylesheet" type="text/css"
      href="list01.css">
</head>
<body>
<ul class="exampledisc"><li>Demo</li></ul>
<ul class="examplecircle"><li>Demo</li></ul>
<ul class="exampledisc"><li>Demo</li></ul>
<ul class="examplesquare"><li>Demo</li></ul>
<ul class="exampledecimal"><li>Demo</li></ul>
<ul class="exampledecimalleadingzero"><li>Demo</li></ul>
<ul class="examplelowerroman"><li>Demo</li></ul>
<ul class="exampleupperroman"><li>Demo</li></ul>
<ul class="examplelowergreek"><li>Demo</li></ul>
<ul class="examplelowerlatin"><li>Demo</li></ul>
<ul class="exampleupperlatin"><li>Demo</li></ul>
<ul class="examplearmenian"><li>Demo</li></ul>
<ul class="examplegeorgian"><li>Demo</li></ul>
<ul class="exampleloweralpha"><li>Demo</li></ul>
<ul class="exampleupperalpha"><li>Demo</li></ul>
<ul class="examplenone"><li>Demo</li></ul>
</body>
</html>
 
<!-- 《程式語言教學誌》的範例程式
     檔名:list01.html
     功能:示範 CSS 2.1 樣式表的使用
     作者:張凱慶
     時間:西元 2011 年 7 月 -->


瀏覽器 (broswer) 開啟如下



中英文術語對照
性質property
關鍵字keyword
瀏覽器broswer


您可以繼續參考

JavaScript 範例

表格
清單


相關目錄
CSS 2.1 快速導覽
HTML, CSS 教材
首頁


參考資料
http://www.w3.org/TR/2011/REC-CSS2-20110607/generate.html
https://developer.mozilla.org/en/CSS/list-style-type

沒有留言: