aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/list-style-image/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/css/list-style-image/index.html')
-rw-r--r--files/zh-cn/web/css/list-style-image/index.html145
1 files changed, 145 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/list-style-image/index.html b/files/zh-cn/web/css/list-style-image/index.html
new file mode 100644
index 0000000000..8d026ccf10
--- /dev/null
+++ b/files/zh-cn/web/css/list-style-image/index.html
@@ -0,0 +1,145 @@
+---
+title: list-style-image
+slug: Web/CSS/list-style-image
+tags:
+ - CSS列表
+ - CSS属性
+ - 参考
+translation_of: Web/CSS/list-style-image
+---
+<p>{{ CSSRef}}</p>
+
+<h2 id="概要">概要</h2>
+
+<p> <strong><code>list-style-image</code></strong> 属性用来指定一个能用来作为列表元素标记的图片。</p>
+
+<p>通常来说使用{{ cssxref("list-style") }}较为方便。</p>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="brush:css">/* Keyword values */
+list-style-image: none;
+
+/* &lt;url&gt; values */
+list-style-image: url('starsolid.gif');
+
+/* Global values */
+list-style-image: inherit;
+list-style-image: initial;
+list-style-image: unset;
+</pre>
+
+<h3 id="值">值</h3>
+
+<dl>
+ <dt><code>&lt;url&gt;</code></dt>
+ <dd>用来作为标记的图片的地址。</dd>
+ <dt><code>none</code></dt>
+ <dd>说明没有图片被用作标记。如果这个值被设定,那么 {{ Cssxref("list-style-type") }} 中定义的值会被取代。</dd>
+</dl>
+
+<h3 id="正式语法">正式语法</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="举例">举例</h2>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html">&lt;ul&gt;
+ &lt;li&gt;Item 1&lt;/li&gt;
+ &lt;li&gt;Item 2&lt;/li&gt;
+&lt;/ul&gt;
+</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css">ul {
+ list-style-image: url("https://mdn.mozillademos.org/files/11981/starsolid.gif")
+}</pre>
+
+<h3 id="结果">结果</h3>
+
+<p>{{ EmbedLiveSample('Examples') }}</p>
+
+<h2 id="说明">说明</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-image', 'list-style-image') }}</td>
+ <td>{{ Spec2('CSS3 Lists') }}</td>
+ <td>Extends support to any {{cssxref("&lt;image&gt;")}} data type.</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('CSS2.1', 'generate.html#propdef-list-style-image', 'list-style-image') }}</td>
+ <td>{{ Spec2('CSS2.1') }}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器支持">浏览器支持</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>特征</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>基本支持</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>特征</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>基本支持</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="其他链接">其他链接</h2>
+
+<ul>
+ <li>{{ Cssxref("list-style") }}, {{ Cssxref("list-style-type") }}, {{ Cssxref("list-style-position") }}</li>
+</ul>