如何从 WordPress 中的小部件中删除项目符号

发布于 2024-12-09 11:09:56 字数 1405 浏览 0 评论 0原文

我在将样式覆盖应用于我的 WordPress 主题中的所有小部件时遇到一些困难。我从头开始创建了这个主题,所以我完全不知道他们是如何将这些子弹带到那里的。

我想从列表中的项目中删除项目符号。 html 是:

<li id="categories-3" class="widget widget_categories"><h2 class="widgettitle">Categories</h2>
        <ul>
    <li class="cat-item cat-item-4"><a href="http://www.bignotch.com/category/big-notch-updates/" title="View all posts filed under Big Notch Updates">Big Notch Updates</a> (20)
</li>
    <li class="cat-item cat-item-5"><a href="http://www.bignotch.com/category/music_news/" title="View all posts filed under Music News">Music News</a> (50)
</li>
    <li class="cat-item cat-item-6"><a href="http://www.bignotch.com/category/ramblings/" title="View all posts filed under Ramblings">Ramblings</a> (43)
</li>
    <li class="cat-item cat-item-7"><a href="http://www.bignotch.com/category/site-news/" title="View all posts filed under Site News">Site News</a> (14)
</li>
    <li class="cat-item cat-item-8"><a href="http://www.bignotch.com/category/stuff-i-like/" title="View all posts filed under Stuff I Like">Stuff I Like</a> (25)
</li>
        </ul>
</li>
</div>

这是我到目前为止想出的代码,但似乎不起作用:

li#categoryposts-3 li.cat-item {list-style: none;}

我不知道此时要做什么。

i´m having some difficulty applying style override to all widgets in my wordpress theme. I created the theme from scratch, so I have absolutely NO IDEA how they got these bullets got there.

I want to remove the bullets from items in the lists. The html is:

<li id="categories-3" class="widget widget_categories"><h2 class="widgettitle">Categories</h2>
        <ul>
    <li class="cat-item cat-item-4"><a href="http://www.bignotch.com/category/big-notch-updates/" title="View all posts filed under Big Notch Updates">Big Notch Updates</a> (20)
</li>
    <li class="cat-item cat-item-5"><a href="http://www.bignotch.com/category/music_news/" title="View all posts filed under Music News">Music News</a> (50)
</li>
    <li class="cat-item cat-item-6"><a href="http://www.bignotch.com/category/ramblings/" title="View all posts filed under Ramblings">Ramblings</a> (43)
</li>
    <li class="cat-item cat-item-7"><a href="http://www.bignotch.com/category/site-news/" title="View all posts filed under Site News">Site News</a> (14)
</li>
    <li class="cat-item cat-item-8"><a href="http://www.bignotch.com/category/stuff-i-like/" title="View all posts filed under Stuff I Like">Stuff I Like</a> (25)
</li>
        </ul>
</li>
</div>

This is the code I came up with so far that doesn't seem to be working:

li#categoryposts-3 li.cat-item {list-style: none;}

I have no idea what to do at this point.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

み格子的夏天 2024-12-16 11:09:56

一定是

li#categories-3 {background-image: none; list-style: none;}
li#categories-3 li.cat-item {background-image: none; list-style: none;}
  1. id错误
  2. 你需要两种样式

It has to be

li#categories-3 {background-image: none; list-style: none;}
li#categories-3 li.cat-item {background-image: none; list-style: none;}
  1. There is a wrong id
  2. You need two styles
反话 2024-12-16 11:09:56
li.widget ul,
li.widget li { list-style: none; }
li.widget ul,
li.widget li { list-style: none; }
未央 2024-12-16 11:09:56
#categoryposts-3 ul {
    background-image: none; list-style: none;
}
#categoryposts-3 ul {
    background-image: none; list-style: none;
}
謌踐踏愛綪 2024-12-16 11:09:56

在 CSS 中使用 !important 关键字,如下所示:

li{
list-style:none !important;
}

Use the !important keyword in your css, like this:

li{
list-style:none !important;
}
有深☉意 2024-12-16 11:09:56

下面的代码从列表中删除项目符号。

<li style="list-style: none;" class="cat-item cat-item-4"><a href="http://www.bignotch.com/category/big-notch-updates/" title="View all posts filed under Big Notch Updates">Big Notch Updates</a> (20)
</li>
<li style="list-style: none;" class="cat-item cat-item-5"><a href="http://www.bignotch.com/category/music_news/" title="View all posts filed under Music News">Music News</a> (50)
</li>
<li style="list-style: none;" class="cat-item cat-item-6"><a href="http://www.bignotch.com/category/ramblings/" title="View all posts filed under Ramblings">Ramblings</a> (43)
</li>
    <li style="list-style: none;" class="cat-item cat-item-7"><a href="http://www.bignotch.com/category/site-news/" title="View all posts filed under Site News">Site News</a> (14)
</li>
    <li style="list-style: none;" class="cat-item cat-item-8"><a href="http://www.bignotch.com/category/stuff-i-like/" title="View all posts filed under Stuff I Like">Stuff I Like</a> (25)
</li>

The code below removes the bullets from a list.

<li style="list-style: none;" class="cat-item cat-item-4"><a href="http://www.bignotch.com/category/big-notch-updates/" title="View all posts filed under Big Notch Updates">Big Notch Updates</a> (20)
</li>
<li style="list-style: none;" class="cat-item cat-item-5"><a href="http://www.bignotch.com/category/music_news/" title="View all posts filed under Music News">Music News</a> (50)
</li>
<li style="list-style: none;" class="cat-item cat-item-6"><a href="http://www.bignotch.com/category/ramblings/" title="View all posts filed under Ramblings">Ramblings</a> (43)
</li>
    <li style="list-style: none;" class="cat-item cat-item-7"><a href="http://www.bignotch.com/category/site-news/" title="View all posts filed under Site News">Site News</a> (14)
</li>
    <li style="list-style: none;" class="cat-item cat-item-8"><a href="http://www.bignotch.com/category/stuff-i-like/" title="View all posts filed under Stuff I Like">Stuff I Like</a> (25)
</li>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文