Counting Elements
Zählt dynamisch HTML Elemente und stellt den Wert in CSS bereit.
Syntax:
csssection { counter-increment: [individual Name of the Counter] }
Using the Counter-Increment
csssection { counter-increment: section-counter; } /* Prints Out the increasing number in front of the section title */ .secton-title::before { content: counter(section-counter); }
Adding some opacity, point and space.
css/* Prints Out the increasing number in front of the section title */ .secton-title::before { opacity: .5; content: counter(section-counter) ". "; }