标记 | ::marker
::marker
这是一种实验技术
由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。另外请注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。
::marker元素代表一个列表项的标记框(<li>)。标记通常是一个项目符号或数字。
::marker {
color: red;
font-size: 1.5em;
}
只有一小部分CSS属性可以使用::marker
:
color
text-combine-upright
- 全部字体属性
例
HTML
<ul>
<li>Peaches</li>
<li>Apples</li>
<li>Plums</li>
</ul>
CSS
::marker {
color: red;
font-size: 1.5em;
}
结果
规格
Specification | Status | Comment |
---|---|---|
CSS Pseudo-Elements Level 4The definition of '::marker' in that specification. | Working Draft | No significant change. |
CSS Lists and Counters Module Level 3The definition of '::marker' in that specification. | Working Draft | Initial definition. |
浏览器兼容性
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | No support | No support | No support | No support | No support |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | No support | No support | No support | No support | No support | No support |