From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/_doublecolon_marker/index.html | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 files/zh-cn/web/css/_doublecolon_marker/index.html (limited to 'files/zh-cn/web/css/_doublecolon_marker/index.html') 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' +--- +
{{CSSRef}}
+ +

::marker CSS pseudo-element(CSS伪元素) 选中一个list item的marker box,后者通常含有一个项目符号或者数字。它作用在任何设置了display: list-item的元素或伪元素上,例如{{HTMLElement("li")}}和{{HTMLElement("summary")}}。

+ +
::marker {
+  color: blue;
+  font-size: 1.2em;
+}
+ +

允许的属性值

+ +

在将::marker作为选择器的规则中,只能使用某些CSS属性:

+ + + +
+

规范指出,将来可能会支持其他CSS属性。

+
+ +

语法

+ +
{{CSSSyntax}}
+ +

示例

+ +

HTML

+ +
<ul>
+  <li>Peaches</li>
+  <li>Apples</li>
+  <li>Plums</li>
+</ul>
+ +

CSS

+ +
ul li::marker {
+  color: red;
+  font-size: 1.5em;
+}
+ +

Result

+ +

{{EmbedLiveSample('示例')}}

+ +

标准

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS4 Pseudo-Elements', '#marker-pseudo', '::marker')}}{{Spec2('CSS4 Pseudo-Elements')}}No significant change.
{{SpecName('CSS3 Lists', '#marker-pseudo', '::marker')}}{{Spec2('CSS3 Lists')}}Initial definition.
+ +

浏览器兼容性

+ +
+ + +

{{Compat("css.selectors.marker")}}

+
+ +

参见

+ + -- cgit v1.2.3-54-g00ecf