需要一个CSS破解,使数字不显示在无序列表中



我使用的内容管理系统将字段放置在有序列表中,但其中一个客户端希望列表中没有数字。我无法覆盖的CSS文件阻止我将list-style-type更改为none(即使我使用核选项!important)。如果你知道一个,我想一个安全的CSS破解,使数字删除或不可见。谢谢你抽出时间。

这是你的小提琴:

http://jsfiddle.net/x3bm8yk7/

HTML:

<ol class="no-numbers">
    <li>Here's the first item in the list</li> 
    <li>Here's the second item in the list</li> 
    <li>Here's the third item in the list</li> 
</ol>

CSS:

ol.no-numbers /* Can't change list-style properties */
{
}

如果不能更改list-style,可以尝试

ol.no-numbers > li {
    display: block;
}

而不是默认的CCD_ 6。

/* Can't change list-style properties */
ol.no-numbers > li {
  display: block;
}
<ol class="no-numbers">
  <li>Here's the first item in the list</li> 
  <li>Here's the second item in the list</li> 
  <li>Here's the third item in the list</li> 
</ol>

您可以将其应用于li元素以及

ol.no-numbers li{list-style:none;}

更新的演示http://jsfiddle.net/gaby/x3bm8yk7/3/

最新更新