如何在订购清单的项目符号下划线? [英] How to underline an ordered list's bullet?
本文介绍了如何在订购清单的项目符号下划线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下代码,但 2。没有强调。
I have the following code but the "2." is not being underlined. Any help is appreciated.
<li> <span style="border-bottom: 2px solid black;">ComicCon 1990                                                                                                                                                     </span> </li>
推荐答案
您将不得不使用自己的计数器,但是
You will have to use your own counter, but it is possible.
body {
counter-reset: section;
}
ul li {
text-decoration: underline;
list-style: none;
}
ul li::before {
counter-increment: section;
content: counter(section) ". ";
}
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
</ul>
如果只想用下划线标出数字,则将该属性移到:: before属性。
If you want just the numbers underlined, move that attribute to the ::before property.
这篇关于如何在订购清单的项目符号下划线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文