An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
November 21, 2016 03:02 pm GMT
Original Link: https://css-tricks.com/style-list-markers-css/
Style List Markers in CSS
It's a perfectly reasonable to want to style the marker of list items. You know: blue bullets with black text in an unordered list. Or red counters with knockout white numbers in an ordered list.
There is a working draft spec that defines a ::marker
pseudo-element that would give us this control.
/* Not supported anywhere; subject to change */
li::marker {
color: blue;
}
It's possible to do this styling now, though, thanks to CSS counters. The trick is …
Style List Markers in CSS is a post from CSS-Tricks
Original Link: https://css-tricks.com/style-list-markers-css/
Share this article:
Tweet
View Full Article