【问题标题】:LI list style not applyingLI 列表样式不适用
【发布时间】:2023-03-05 02:36:02
【问题描述】:

这是我的代码,我在 wordpress 网站中使用它。 "list-style: none" 不起作用,它为每个 li 标签显示 1,2..。

 <ul class="bxslider" style="width: auto; position: relative; -webkit-transition: 0s; transition: 0s; -webkit-transform: translate3d(0, -471px, 0);">
     <li style="float: none; list-style: none; width: 683px; margin-bottom: 3px;" class="bx-clone">
          <blockquote>We are getting calls every now and then. You have done a great job. Our business is growing. I want to place an order for a new web site with you.<br /><br />
         <p style="text-align:right;margin-right:20px;">- Andrewan</p>
    </blockquote>
     </li>
 </ul>

【问题讨论】:

  • 你能粘贴剩下的html/css吗???
  • 你能粘贴bxslider的css吗???
  • 添加 list-style:none 到 ul
  • 检查我的答案,我使用了 list-style-type: none;
  • 我修改了你的代码,但我没有看到任何编号。 jsfiddle.net/RHG8K 自己看。它一定是别的东西。

标签: html css wordpress


【解决方案1】:

尝试将list-style:none 放在li 标记的封闭ul 标记中。

编辑尝试在list-style:none; 之后添加!important 您可能有一个父 css 规则,其中 !important 覆盖了您想要的规则。

【讨论】:

  • 我不认为它会起作用....list-style:none,无论是在li 还是ul 都有相同的目的!
  • 我需要睡眠就是我需要的。
  • 你可以在睡前删除这个答案。晚安“困”
  • @AnkurDhanuka : 我想他睡着了....你能给你的直播网址链接吗,这可能会显示一些东西!!
【解决方案2】:

由于这是一个无序列表,因此不可能在每个 li 处获得 1,2,3。可能是某些标签没有正确关闭。现在,如果您不想更改标记,以下代码可能会对您有所帮助。

.bxslider{
list-style:none;
}

【讨论】:

    【解决方案3】:

    我想试试这个 li { list-style-type: none !important; } 我觉得这很好。

    【讨论】:

    • 试试 jquery css() 函数。它可能会解决您的问题。
    猜你喜欢
    • 2012-09-02
    • 2013-09-27
    • 2012-07-27
    • 2013-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多