我试图让嵌套ol的第二部分有字母列表项,但它们都显示为数字。如何在第二个嵌套部分中将其更改为a)和b)?
<p>This is some texts:<br>
<ol>
<ol>
<li class=first list item.</li>
<li class="list-numbers">second list item</li>
</ul>
Some text
<ol class="list-alphabet">
<li class="list-alphabet">first list item second part.</li>
<li class="list-alphabet">second list item second part</li>
</ol>
</ol>
</div>
ol.alphabet li {
list-style: lower-alpha;
}
.alphabet ol li {
list-style: lower-alpha;
}
ol-.alphabet li {
list-style: lower-alpha;
}
ol li ol li.alphabet {
list-style: lower-alpha;
}
ol li ol li. {
list-style: lower-alpha;
}
答案 0 :(得分:0)
您似乎混淆了CSS 'list-alphabet / alphabet'名称。
更新了代码
<p>This is some texts:</p>
<br>
<ol>
<ol>
<li>first list item.</li>
<li>second list item</li>Some text
<ol class="alphabet">
<li>first list item second part.</li>
<li>second list item second part</li>
</ol>
</ol>
</ol>
CSS
ol.alphabet li {
list-style: lower-alpha;
}