div如下:
<div id="page">
<h1>Heading Title</h1>
<h2>Subheading Title</h2>
<h2>Subheading Title</h2>
<h1>Heading Title</h1>
<h2>Subheading</h2>
<h1>Heading Title</h1>
</div>
要实现的效果如下:
1) Heading Title
1.1) Subheading Title
1.2) Subheading Title
2) Heading Title
2.1) Subheading Title
3) Heading Title
参考:
CSS counter-increment