blob: 20de87e51b556adb42d82503ea7e288d025111d7 (
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
|
---
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>
{{Compat("css.properties.list-style")}}
<h2 id="See_also" name="See_also">另参见</h2>
<ul>
<li>{{Cssxref("list-style-type")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}</li>
</ul>
|