无序列表以自定义编号开头

时间:2011-10-05 20:55:03

标签: css

如何使用自定义数字开始我的ul列表,让我们说5。

.top_list ul {
list-style-type: decimal;
}

会显示: 1。 2。 3。 ....

我想让列表从5开始。我能做到吗?

泰!

4 个答案:

答案 0 :(得分:1)

您可以在HTML中指定它:

<ol start="5">
  ...
</ol>

答案 1 :(得分:1)

你想要olul无序。

ol支持start字段,因此在标记中您可以编写

<ol start=5>

答案 2 :(得分:1)

你是否有机会意味着&lt; ol&gt;如在有序列表中?

如果你知道google什么,那么3秒的谷歌搜索可以帮到你。

http://www.arraystudio.com/as-workshop/make-ol-list-start-from-number-different-than-1-using-css.html

答案 3 :(得分:1)

这个的css属性(感谢文章中的simshaun)是[counter-reset](http://www.w3.org/TR/CSS2/generate.html#counters)属性

ol.list { counter-reset: item 5 }