diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/_doublecolon_marker/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/css/_doublecolon_marker/index.html')
-rw-r--r-- | files/zh-cn/web/css/_doublecolon_marker/index.html | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/_doublecolon_marker/index.html b/files/zh-cn/web/css/_doublecolon_marker/index.html new file mode 100644 index 0000000000..047033e75f --- /dev/null +++ b/files/zh-cn/web/css/_doublecolon_marker/index.html @@ -0,0 +1,91 @@ +--- +title: '::marker' +slug: 'Web/CSS/::marker' +translation_of: 'Web/CSS/::marker' +--- +<div>{{CSSRef}}</div> + +<p><span class="seoSummary"><strong><code>::marker</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> <a href="/en/CSS/Pseudo-elements">pseudo-element</a>(CSS伪元素) 选中一个list item的marker box,后者通常含有一个项目符号或者数字。</span>它作用在任何设置了<code><a href="/en-US/docs/Web/CSS/display">display: list-item</a></code>的元素或伪元素上,例如{{HTMLElement("li")}}和{{HTMLElement("summary")}}。</p> + +<pre class="brush: css no-line-numbers notranslate">::marker { + color: blue; + font-size: 1.2em; +}</pre> + +<h2 id="允许的属性值">允许的属性值</h2> + +<p><span class="tlid-translation translation" lang="zh-CN"><span title="">在将</span></span><code>::marker</code><span class="tlid-translation translation" lang="zh-CN"><span title="">作为选择器的规则中,只能使用某些CSS属性:</span></span></p> + +<ul> + <li>All <a href="/en-US/docs/Web/CSS/CSS_Fonts">font properties</a>(字体属性)</li> + <li>{{CSSxRef("color")}}</li> + <li>{{CSSxRef("text-combine-upright")}}, {{CSSxRef("unicode-bidi")}} and {{CSSxRef("direction")}} properties</li> + <li>The {{CSSxRef("content")}} property</li> +</ul> + +<div class="blockIndicator note"> +<p><span class="tlid-translation translation" lang="zh-CN"><span title="">规范指出,将来可能会支持其他CSS属性。</span></span></p> +</div> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox notranslate">{{CSSSyntax}}</pre> + +<h2 id="示例">示例</h2> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: html notranslate"><ul> + <li>Peaches</li> + <li>Apples</li> + <li>Plums</li> +</ul></pre> + +<h3 id="CSS">CSS</h3> + +<pre class="brush: css notranslate">ul li::marker { + color: red; + font-size: 1.5em; +}</pre> + +<h3 id="Result">Result</h3> + +<p>{{EmbedLiveSample('示例')}}</p> + +<h2 id="标准">标准</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('CSS4 Pseudo-Elements', '#marker-pseudo', '::marker')}}</td> + <td>{{Spec2('CSS4 Pseudo-Elements')}}</td> + <td>No significant change.</td> + </tr> + <tr> + <td>{{SpecName('CSS3 Lists', '#marker-pseudo', '::marker')}}</td> + <td>{{Spec2('CSS3 Lists')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<div> + + +<p>{{Compat("css.selectors.marker")}}</p> +</div> + +<h2 id="参见">参见</h2> + +<ul> + <li>默认拥有marker boxes的HTML元素:{{HTMLElement("ol")}},{{HTMLElement("li")}},{{HTMLElement("summary")}}</li> +</ul> |