如何在有序列表中左对齐数字?
1. an item
// skip some items for brevity
9. another item
10. notice the 1 is under the 9, and the item contents also line up
Run Code Online (Sandbox Code Playgroud)
更改有序列表中的数字后面的字符?
1) an item
Run Code Online (Sandbox Code Playgroud)
还有一个CSS解决方案,可以从数字更改为字母/罗马列表,而不是使用ol元素上的type属性.
我最感兴趣的是适用于Firefox 3的答案.
我认为这个问题的答案是否定的......但有没有人知道一种HTML/CSS方式来创建一个有序列表而没有一段时间后的数字?或者,或者,指定分隔符?
理想情况下,我不想为每个数字使用不同的类进行list-style-image,但这是我迄今为止所能想到的......这看起来非常不合情理.
IE:
Default Style:
1. ______
2. ______
3. ______
Desired Style:
1 ______
2 ______
3 ______
Alternate Style:
1) ______
2) ______
3) ______
Run Code Online (Sandbox Code Playgroud) 我想知道是否可以使用带有")"intead"的字母." 在有序列表中.像这样的东西:
a) Some text...
b) Some text...
c) Some text...
Run Code Online (Sandbox Code Playgroud)
到现在为止我得到了:
a.) Some text...
b.) Some text...
c.) Some text...
Run Code Online (Sandbox Code Playgroud)
所以我需要消除这些要点.
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;
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<div class="theclass">
<ol type="a">
<li>Some text...</li>
<li>Some text...</li>
<liSome text... </li>
</ol>
</div>
Run Code Online (Sandbox Code Playgroud)