HTML5/CSS - <ol> 有字母和括号?
HTML5/CSS - <ol> with letters and parentheses?
我想知道是否可以使用带有“)”而不是“.”的字母。在有序列表中。像这样:
a) Some text...
b) Some text...
c) Some text...
到目前为止我得到:
a.) Some text...
b.) Some text...
c.) Some text...
所以我需要消除点数
CSS:
.theclass ol li{
margin: 0 0 0 1em;
}
.theclass ol li:before{
content: ') ';
position: absolute;
margin-left: -3.4em;
text-align: right;
width: 3em;
}
HTML:
<div class="theclass">
<ol type="a">
<li>Some text...</li>
<li>Some text...</li>
<liSome text... </li>
</ol>
</div>
我找到了这个。
我没有足够的点赞。
这不是我的解决方案!
在此处找到:Ordered list (HTML) lower-alpha with right parentheses?
示例 Jsfiddle
ol {
counter-reset: list;
margin: 0; }
ol > li {
list-style: none;
position: relative; }
ol > li:before {
counter-increment: list;
content: counter(list, lower-alpha) ") ";
position: absolute;
left: -1.4em; }
我想这就是您要找的..?
另一个答案可以在这里找到:
How to remove dot “.” after number in ordered list items in OL LI? 由 Moin Zaman 回答
我想知道是否可以使用带有“)”而不是“.”的字母。在有序列表中。像这样:
a) Some text...
b) Some text...
c) Some text...
到目前为止我得到:
a.) Some text...
b.) Some text...
c.) Some text...
所以我需要消除点数
CSS:
.theclass ol li{
margin: 0 0 0 1em;
}
.theclass ol li:before{
content: ') ';
position: absolute;
margin-left: -3.4em;
text-align: right;
width: 3em;
}
HTML:
<div class="theclass">
<ol type="a">
<li>Some text...</li>
<li>Some text...</li>
<liSome text... </li>
</ol>
</div>
我找到了这个。
我没有足够的点赞。 这不是我的解决方案!
在此处找到:Ordered list (HTML) lower-alpha with right parentheses?
示例 Jsfiddle
ol {
counter-reset: list;
margin: 0; }
ol > li {
list-style: none;
position: relative; }
ol > li:before {
counter-increment: list;
content: counter(list, lower-alpha) ") ";
position: absolute;
left: -1.4em; }
我想这就是您要找的..?
另一个答案可以在这里找到: How to remove dot “.” after number in ordered list items in OL LI? 由 Moin Zaman 回答