带括号的HTML编号 [英] HTML numbering with brackets
本文介绍了带括号的HTML编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请如何设置这种格式的编号:
Please how to set up numbering in this format:
1) number 1
2) number 2
3) ...
在html中?
我只找到一种获取这种格式的方法:
I only found a way to get this format:
1. number 1
2. number 2
3. ...
数字后没有括号.
还可以设置开始方式,编号方式,但不能设置其他格式.
Also, is it possible to set up start, kind of numbering, but no other format.
推荐答案
您可以使用有序列表<ol>
:
ol {
counter-reset: list;
}
ol > li {
list-style: none;
}
ol > li:before {
content: counter(list) ") ";
counter-increment: list;
}
<ol>
<li>some text</li>
<li>some more text</li>
<li>some further text</li>
</ol>
示例 JSFiddle
Sample JSFiddle
这篇关于带括号的HTML编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文