如何添加括号(a)到有序列表?兼容所有浏览器 [英] How to add brackets (a) to ordered list? compatible in all browsers

查看:1313
本文介绍了如何添加括号(a)到有序列表?兼容所有浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须显示

(a)

(b)

(c)

更新

我发现了一种CSS方式

I found a CSS way

ol {list-style-type: none;}
li:before {content: "(" counter(section, lower-alpha) ") ";}
li { counter-increment: section;}

但它不工作在IE 7和更低。

but it not works in IE 7 and lower.

推荐答案

这是可能的自定义计数器,但至少IE7-不支持它,有些人可能不会。详情请参阅: http://www.quirksmode.org/css/counter.html

This is possible with custom counters, but at least IE7- doesn't support it, some others mightn't either. See here for details: http://www.quirksmode.org/css/counter.html

例如:

li:before {
    content: "(" counter(mycounter,lower-latin) ")";
}

这篇关于如何添加括号(a)到有序列表?兼容所有浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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