首页 > 代码库 > [CSS] Use CSS Counters to Create Pure CSS Dynamic Lists

[CSS] Use CSS Counters to Create Pure CSS Dynamic Lists

CSS counters let you create dynamic lists without JavaScript. In this lesson, we will create a multi-level table of contents using the CSS counter-reset and counter-increment properties with the counter attribute.

 

 

<iframe style="width: 100%; height: 300px;" src="https://embed.plnkr.co/vSLmyOId0vpWhR3HH4qx/" width="320" height="240"></iframe>

[CSS] Use CSS Counters to Create Pure CSS Dynamic Lists