有序列表中的粗体数字 [英] Bold numbers in ordered lists

查看:94
本文介绍了有序列表中的粗体数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要在有序列表中获得粗体数字,可以写一下


ol {font-weight:bold}

ol span {font-weight:normal }


< ol>

< li>< span> ......< / span>< / li>

< li>< span> ......< / span>< / li>

< / ol>


还有更好的方法吗?


-

在记忆中Alan J. Flavell
http://groups.google.com/groups/sear ... Alan.J.Flavell

To get bold numbers in ordered lists, one can write

ol { font-weight: bold }
ol span { font-weight: normal }

<ol>
<li><span>......</span></li>
<li><span>......</span></li>
</ol>

Is there a better way?

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell

推荐答案

文章

< Pi ******* ************************@s5b004.rrzn.u ni-hannover.de>,

Andreas Prilop< pr ********@trashmail.netwrote:
In article
<Pi*******************************@s5b004.rrzn.u ni-hannover.de>,
Andreas Prilop <pr********@trashmail.netwrote:

要在有序列表中获得粗体数字,可以写一下


ol {font-weight:bold}

ol span {font-weight:no rmal}


< ol>

< li>< span> ......< / span>< / li>

< li>< span> ......< / span>< / li>

< / ol>


还有更好的方法吗?
To get bold numbers in ordered lists, one can write

ol { font-weight: bold }
ol span { font-weight: normal }

<ol>
<li><span>......</span></li>
<li><span>......</span></li>
</ol>

Is there a better way?



有一种非常好的方法,使用

有序列表的语义等价物,这是一个两列表,您的要求具有一个简单的解决方案。


-

dorayme

There is a perfectly good way that uses the semantic equivalent of an
ordered list, a two column table, with which your requirement has a
simple solution.

--
dorayme




Jonathan N. Little写道:

Jonathan N. Little wrote:

>

ol {counter-reset:item}

ol li {display:block}

ol li:before {

content:counter(item)"。 " ;;

counter-increment:item;

font-weight:bold;

颜色:红色;

}
>
ol { counter-reset: item }
ol li { display: block }
ol li:before {
content: counter(item) ". ";
counter-increment: item;
font-weight: bold;
color: red;
}



很好 - 对于CSS不足的浏览器来说它也会很好地降级。


-

Berg

Nice - and it degrades well for CSS deficient browsers, too.

--
Berg


jACK meinte:
jACK meinte:

Firefox中显示的颜色,但没有显示在IE 6
The colors showed in Firefox, but didn''t show in IE 6



Jonathan已经提到你知道谁......


Gregor

-
http://photo.gregorkofler.at : :: Landschafts- und Reisefotografie
http://web.gregorkofler.com : :: meine JS-Spielwiese
http://www.image2d.com : ::Bildagenturfürdenalpinen Raum

Jonathan already mentioned "you-know-who"...

Gregor
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum


这篇关于有序列表中的粗体数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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