是否可以为有序列表指定起始编号? [英] Is it possible to specify a starting number for an ordered list?

查看:1130
本文介绍了是否可以为有序列表指定起始编号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有序列表,我想要的初始数字是6.我发现这是支持(现已弃用)。在本规范中,他们说可以使用CSS指定起始整数。 (而不是 start 属性)

I have a ordered list where I would like the initial number to be 6. I found that this was supported (now deprecated) in HTML 4.01. In this specification they say that you can specify the starting integer by using CSS. (instead of the start attribute)

如何用CSS指定起始编号?

How would you specify the starting number with CSS?

推荐答案

如果您需要在特定点启动有序列表(OL)的功能,您必须将您的doctype指定为HTML 5;它是:

If you need the functionality to start an ordered list (OL) at a specific point, you'll have to specify your doctype as HTML 5; which is:

<!doctype html>

使用该doctype,可以设置 start 属性。例如:

With that doctype, it is valid to set a start attribute on an ordered list. Such as:

<ol start="6">
  <li>Lorem</li>
  <li>Ipsum</li>
  <li>Dolor</li>
</ol>

这篇关于是否可以为有序列表指定起始编号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆