代码编辑器:
x
1
2
<meta charset="utf-8"><link href="/static/next/css/tryit.css?v=2017082407" rel="stylesheet"/>
3
<style>
4
body {counter-reset:section;}
5
h1 {counter-reset:subsection;}
6
h1:before
7
{
8
counter-increment:section;
9
content:"Section " counter(section) ". ";
10
}
11
h2:before
12
{
13
counter-increment:subsection;
14
content:counter(section) "." counter(subsection) " ";
15
}
16
</style>
17
<p><b>注意:</b> 仅当 !DOCTYPE已经定义 IE8支持 这个属性.</p>
18
<h1>HTML tutorials</h1>