开发者

Style (only) decimal of ordered list

开发者 https://www.devze.com 2023-02-15 13:46 出处:网络
Is there anyway to bold the decimals in an ordered list using CSS only? The CMS we are using is spitting out li\'s with no nested p/span/header tag so I can\'t bold the li and reset the nested tag...

Is there anyway to bold the decimals in an ordered list using CSS only? The CMS we are using is spitting out li's with no nested p/span/header tag so I can't bold the li and reset the nested tag...

Any ideas开发者_Go百科?

thanks


you may use :first-line pseudo-element for the li, like

li {
  font-weight: bold;
}
li:first-line {
  font-weight: normal;
}

It works for the latest versions of modern browsers, except IE.

For IE you need to use scripting to add nested tag for the li's

0

精彩评论

暂无评论...
验证码 换一张
取 消