使ABC有序列表项具有粗体样式 [英] Make ABC Ordered List Items Have Bold Style
本文介绍了使ABC有序列表项具有粗体样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个html有序列表,类型设置为A
I have an html Ordered list with type set to "A"
<ol type="A">...</ol>
因此,每个列表项将以A,B,C等开头。
Thus, each list item will start with A, B, C, etc.
我想将A,B,C字母设置为粗体。我已经尝试设置font-weight:bold;通过css,但它没有工作。关于如何做到这一点的任何建议?
I would like to style the A, B, C letters to be bold. I have tried setting font-weight:bold; via css, but it didn't work. Any suggestions on how to do this?
推荐答案
一个骗子,但它的工作原理:
a bit of a cheat, but it works:
HTML:
<ol type="A" style="font-weight: bold;">
<li><span>Text</span></li>
<li><span>More text</span></li>
</ol>
CSS:
li span { font-weight: normal; }
这篇关于使ABC有序列表项具有粗体样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文