我在将样式覆盖应用于我的 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;}
此时我不知道该怎么做。
最佳答案
必须是
li#categories-3 {background-image: none; list-style: none;}
li#categories-3 li.cat-item {background-image: none; list-style: none;}
- 有一个错误的id
- 你需要两种风格
关于css - 如何从 Wordpress 的小部件中删除元素符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7758286/