Skip to content

Instantly share code, notes, and snippets.

@Stoffo
Created November 23, 2015 16:34
Show Gist options
  • Save Stoffo/9e6c196febc6e2f9771e to your computer and use it in GitHub Desktop.
Save Stoffo/9e6c196febc6e2f9771e to your computer and use it in GitHub Desktop.
A simple example how CSS Counters work
<style>
ul {
counter-reset: foo;
}
li:before {
counter-increment: foo;
content: 'Count: ' counter(foo);
}
</style>
<ul>
<li>Bar</li>
<li>Bar</li>
<li>Bar</li>
<li>Bar</li>
<li>Bar</li>
<li>Bar</li>
<li>Bar</li>
<li>Bar</li>
<li>Bar</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment