Repeated series of number via CSS
问题 I'm trying to do something like this: <h2>1.1 Bananas</h2> <h3>1.1.1 </h3> <h3>1.1.2 </h3> <h3>1.1.3 </h3> <h2>1.1 Apples</h2> <h3>1.1.1 </h3> <h3>1.1.2 </h3> <h3>1.1.3 </h3> <h2>1.1 Oranges</h2> <h3>1.1.1</h3> <h3>1.1.2</h3> <h3>1.1.3</h3> Notice how the number series repeats. I can do autonumbering via CSS - but I can't figure out if there's a way to repeat the numbered series. 回答1: One way would to be use CSS counters and reset them every time a h2 is encountered like in below snippet. The