Html firefox中未显示li元素的背景图像

Html firefox中未显示li元素的背景图像,html,css,Html,Css,我的页面中有一部分html代码,如下所示: <section class ="sidebar"> <ul> <li class="facebook">Facebook</li> <li class="linkedin">LinkedIn</li> <li class="twitter">Twit

我的页面中有一部分html代码,如下所示:

<section class ="sidebar">
            <ul>
                <li class="facebook">Facebook</li>
                <li class="linkedin">LinkedIn</li>
                <li class="twitter">Twitter</li>
                <li class="google-plus">Google+</li>
            </ul>
</section>
    .sidebar ul {
    float: left;
}

.sidebar ul li{
    display: block;
    width:35px;
    text-indent: -9999px;
    margin: 3px;
}

li.facebook{
    height: 35px;
    background: url(img/icon_face.png) center center no-repeat;
    background-size: contain;
}
li.twitter{
    height: 35px;
    background: url(img/icon_twitter.png) center center no-repeat;
    background-size: contain;
}
li.google-plus{
    height: 35px;
    background: url(img/icon_g+.png) center center no-repeat;
    background-size: contain;

}
li.linkedin{
    height: 35px;
    background: url(img/icon_in.png) center center no-repeat;
    background-size: contain;
}
这里发生的是我有两个奇怪的问题:

首先,li.google-plus元素不会显示在任何浏览器中。浏览器只是忽略了它。以下是firebug显示的内容:

第二,firefox中显示的唯一图像是twitter图像。在chrome和opera中,所有其他的都能正确显示。由于它们在其他浏览器中正确显示,我假设问题不在于background属性中的路径

你知道问题出在哪里吗

编辑:

检查firebug关于背景图像路径的说明:


它说它无法加载给定的url

在.sidebar ul li和li.facebook、li.twitter等中。您应该写入未设置的宽度:和高度:属性。

好的,所以问题出在我的AdBlock扩展上。禁用后,它开始正常工作


通过下面的回答,我们找到了答案:

你能在jsFiddle.net上重新创建这个问题吗?或者你能发布你的实际页面吗?当你在url定义中使用'?像这样:url'img/icon_in.png'。为什么在侧边栏ul li中给出宽度,在li.facebook、li.twitter等中给出高度。这可能是迷信,但您文件名中背景img url的+可能会引起问题。您是否尝试过转义类似url的背景:urlimg/icon_g+.png center no repeat;。使用其他图像,代码可以正常工作。谢谢你的提示。但在两者中设置这些属性并不能解决问题。