Last active
December 27, 2015 20:29
-
-
Save velosipedist/7385135 to your computer and use it in GitHub Desktop.
HTML Ordered lists custom marker using CSS and `:before` pseudo-class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ol { | |
counter-reset: custom-counter-name; // any name, use afterwards for incrementing counter | |
// counter-reset: custom-counter-name 1; // can be started from custom index | |
li{ | |
list-style:none; | |
counter-increment: custom-counter-name; | |
} | |
li:before { | |
content: "[" counter(custom-counter-name) "]"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment