::marker
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Псевдоэлемент ::marker
применяет стили к маркеру элемента списка, которые обычно содержит значок или номер. Работает с любым элементом или псевдоэлементом, к которого установлен display: list-item
, например, у такого как <li>
или <summary>
.
::marker {
color: blue;
font-size: 1.2em;
}
Разрешённые свойства
Только некоторые CSS-свойства могут быть использованы с ::marker
в качестве селектора:
- Все свойства шрифтов
white-space
color
text-combine-upright
,unicode-bidi
иdirection
- Свойство
content
- Все animation и transition свойства
Примечание: The specification states that additional CSS properties may be supported in future.
Syntax
Error: could not find syntax for this item
Examples
HTML
<ul>
<li>Peaches</li>
<li>Apples</li>
<li>Plums</li>
</ul>
CSS
ul li::marker {
color: red;
font-size: 1.5em;
}
Result
Спецификации
Specification |
---|
CSS Pseudo-Elements Module Level 4 # marker-pseudo |
Совместимость с браузерами
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
::marker | ||||||||||||
Animation and transition support |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- No support
- No support