1
2
3
4
5
6
7
8
9
<h2></h2>
<h2></h2>
<style>
body {counter-reset:section;}
h2:before {
counter-increment: section;
content: "Chapter" counter(section) ".";
}
</style>

结果如下:

1
2
Chapter1.
Chapter2.