close
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
body{
counter-reset: section;
}
h1{
counter-reset: subsection;
}
h1:before{
counter-increment: section;
content:'段落' counter(section) ':';
}
h2:before{
counter-increment: subsection;
content:counter(section) '-' counter(subsection) ':';
}
</style>
</head>
<body>
<h1>水果</h1>
<h2>蘋果</h2>
<h2>香蕉</h2>
<h2>芭樂</h2>
<h1>季節</h1>
<h2>春</h2>
<h2>夏</h2>
<h2>秋</h2>
<h2>冬</h2>
</body>
</html>
全站熱搜
留言列表