【问题标题】:List lost its bullets [duplicate]列表失去了子弹[重复]
【发布时间】:2014-05-22 07:07:00
【问题描述】:

为什么当我将ul 分成两列时,它会丢失子弹? HTML:

<ul class="with-columns">
    <li>Ringo
    <li>George
    <li>John
    <li>Paul
</ul>

CSS:

ul.with-columns{
    -moz-columns: 2;
    -webkit-columns: 2; 
    -o-columns: 2;
    columns: 2;  
    list-style-type:circle; /* Not works! */
}

示例:http://jsfiddle.net/4xKea/

【问题讨论】:

  • @Ruddy 我知道它一定在某个地方!..
  • 我猜 Alek 给出了正确的答案。但是请注意 - 我认为您应该使用&lt;/li&gt; 关闭&lt;li&gt; 标签,例如&lt;li&gt;Ringo&lt;/li&gt;
  • @IgorReshetnikov,不完全是:stackoverflow.com/a/3008735/1206613

标签: html css html-lists multiple-columns bulletedlist


【解决方案1】:

试试这个:

list-style-position: inside;

fiddle

【讨论】:

    【解决方案2】:

    只需在ul.with-columns css 中添加list-style-position: inside;

    【讨论】:

    • 很遗憾,你来晚了
    猜你喜欢
    • 1970-01-01
    • 2020-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多