Created
March 15, 2019 05:21
-
-
Save asifvora/e8ffb5618f5f6289cec9e50949b978c6 to your computer and use it in GitHub Desktop.
Counters are, in essence, variables maintained by CSS whose values may be incremented by CSS rules to track how many times they're used.
This file contains 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
<style> | |
ul { | |
counter-reset: counter; | |
} | |
li::before { | |
counter-increment: counter; | |
content: counters(counter, '.') ' '; | |
} | |
</style> | |
<ul> | |
<li>List item</li> | |
<li>List item</li> | |
<li> | |
List item | |
<ul> | |
<li>List item</li> | |
<li>List item</li> | |
<li>List item</li> | |
</ul> | |
</li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment