嘿,现在你可以使用CSS反增量属性
就像这样
CSS
body {counter-reset:section;}
h1 {counter-reset:subsection;}
h1:before
{
counter-increment:section;
content:"Section " counter(section) ". ";
font-weight:bold;
}
h2:before
{
counter-increment:subsection;
content:counter(section) "." counter(subsection) " ";
}
HTML
**
Note: IE8 supports these properties only if a !DOCTYPE is specified.
HTML tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
Scripting tutorials
JavaScript
VBScript
Heading
One
Two
**