Html 重置ol中的嵌套计数
我使用以下css在Html 重置ol中的嵌套计数,html,css,html-lists,Html,Css,Html Lists,我使用以下css在ol中生成嵌套计数: ol{ counter-reset: item; } ol li{ display: block; } ol li:before{ content: counters(item, ".")". "; counter-increment: item; float: left; margin-right: 5px; } 在某种嵌套级别上,我希望重置嵌套。我怎样才能做到呢 比如说, <ol>
ol
中生成嵌套计数:
ol{
counter-reset: item;
}
ol li{
display: block;
}
ol li:before{
content: counters(item, ".")". ";
counter-increment: item;
float: left;
margin-right: 5px;
}
在某种嵌套级别上,我希望重置嵌套。我怎样才能做到呢
比如说,
<ol>
<li>
<ol>
<li>
<ol>
<li>
<ol class="reset">
<li>
<ol>
<li></li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
</ol>
但我想要这样的结构
1.
1.1
1.1.1
1 # reset here
1.1
1.
1.1
1.1.1
1 # reset here
1.1