counter-increment CSS property is used to increment a CSS counter. A value of
counter-increment: myCounter would increment
myCounter by 1. You can also add in a optional numeric value to choose how much the counter increases. A value of
counter-increment: myCounter 5would increment
myCounter by 5 every time.
counter-increment is found on an element, it’s associated variable is incremented. In this playground, wherever an element with the class
list-item is found, the
myCounter counter is incremented.