blob: a65ff6621bdbaeb8589d6ac9d0e6aebbe48e64e1 (
plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
---
title: list-style
slug: Web/CSS/list-style
translation_of: Web/CSS/list-style
---
<div>{{CSSRef}}</div>
<div><strong><code>list-style</code></strong> CSS 属性是一个简写对属性集合,包括{{cssxref("list-style-type")}}, {{cssxref("list-style-image")}}, 和 {{cssxref("list-style-position")}}。</div>
<h2 id="Summary" name="Summary">概要</h2>
<p>CSS list-style 属性是设置{{cssxref("list-style-type")}}, {{cssxref("list-style-image")}} 和 {{cssxref("list-style-position")}} 的简写属性。</p>
<p>{{cssinfo}}</p>
<h2 id="Syntax" name="Syntax">语法</h2>
<pre class="syntaxbox"><a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("list-style")}}</pre>
<h3 id="Values" name="Values">值</h3>
<p>以任何顺序接受一个,二个或者三个关键词</p>
<dl>
<dt><code><'list-style-type'></code></dt>
<dd>参看 {{cssxref("list-style-type")}}</dd>
<dt><code><'list-style-image'></code></dt>
<dd>参看 {{cssxref("list-style-image")}}</dd>
<dt><code><'list-style-position'></code></dt>
<dd>参看 {{cssxref("list-style-position")}}</dd>
</dl>
<h2 id="示例">示例</h2>
<h3 id="HTML">HTML</h3>
<pre class="brush: html">List 1
<ul class="one">
<li>List Item1</li>
<li>List Item2</li>
<li>List Item3</li>
</ul>
List 2
<ul class="two">
<li>List Item A</li>
<li>List Item B</li>
<li>List Item C</li>
</ul>
</pre>
<h3 id="CSS">CSS</h3>
<pre class="brush: css">.one {
list-style: circle;
}
.two {
list-style: square inside;
}</pre>
<h3 id="Result">Result</h3>
<p>{{EmbedLiveSample('示例')}}</p>
<h2 id="Specifications" name="Specifications">规范</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">规范</th>
<th scope="col">状态</th>
<th scope="col">注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('CSS3 Lists', '#list-style', 'list-style')}}</td>
<td>{{Spec2('CSS3 Lists')}}</td>
<td>没有改变</td>
</tr>
<tr>
<td>{{SpecName('CSS2.1', 'generate.html#propdef-list-style', 'list-style')}}</td>
<td>{{Spec2('CSS2.1')}}</td>
<td>初始定义</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<div>{{CompatibilityTable}}</div>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Basic support</td>
<td>1.0</td>
<td>{{CompatGeckoDesktop("1")}}</td>
<td>4.0</td>
<td>7.0</td>
<td>1.0</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Phone</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Basic support</td>
<td>1.0</td>
<td>{{CompatGeckoMobile("1")}}</td>
<td>6.0</td>
<td>6.0</td>
<td>1.0</td>
</tr>
</tbody>
</table>
</div>
<h2 id="See_also" name="See_also">另参见</h2>
<ul>
<li>{{Cssxref("list-style-type")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}</li>
</ul>
|