Copyright © tutorialspoint.com
The counter-increment property sets how much the counter increments on each occurrence of a selector. Default increment is 1.
All the HTML elements.
object.style.counterIncrement="chapter 2"; |
This example shows a way to number chapters and sections with "Chapter 1", "1.1", "1.2", etc.
h1:before { content: "Chapter " counter(chapter) ". "; counter-increment: chapter; /* Add 1 to chapter */ counter-reset: section; /* Set section to 0 */ } h2:before { content: counter(chapter) "." counter(section) " "; counter-increment: section; } |
Copyright © tutorialspoint.com