相关疑难解决方法(0)

如何自定义有序列表中的数字?

如何在有序列表中左对齐数字?

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 html-lists roman-numerals

99
推荐指数
7
解决办法
9万
查看次数

ol不能从特定计数开始

出于样式的原因,我使用带有伪类的ol元素.不幸的是,我无法从所需的索引开始计算列表项.怎么了?

小提琴

HTML

<ol start="14">
    <li>car</li>
    <li>flower</li>
    <li>garden</li>
    <li>shool</li>
    <li>river</li>
</ol>
Run Code Online (Sandbox Code Playgroud)

CSS

ol {
    width: 850px;
    padding: 0;
    margin: 0 auto;
    counter-reset: item;
    list-style-type: none;
    font-size: 18px;
    line-height: 23px;
    font-weight: 400;
    font-style: normal;
}
li:before {
    content: counter(item)" ";
    counter-increment: item;
}
Run Code Online (Sandbox Code Playgroud)

html css

2
推荐指数
1
解决办法
67
查看次数

标签 统计

css ×2

html ×2

html-lists ×1

roman-numerals ×1