html - Internet Explorer 中不显示背景

标签 html css

我正在尝试创建带有 Logo 和导航的页眉。标志是背景。它在除 Internet Explorer 之外的所有浏览器中都能正确显示。这是 header 的 HTML:

    <div id="header"><div id="navigation"><ul>
<li>
<a href="#" >Home</a>
</li><li>
<a href="#">Profile</a>
</li><li>
<a href="#">Topics</a>
</li><li>
<a href="#">Chat</a>
</li>
</ul>
</div>
</div>

这是CSS:

    #header{
position:fixed;
left:0;
right:0;
top:0;
z-index:1000;
width:100%;
height:48px;
}

/* Navigation */
#navigation{
    padding-left:50px;
background:url("http://localhost/img/logo/purple.png")no-repeat;
    position:absolute;
    left:0;
    top:0;
    min-height:48px;
     z-index:1010;
     display:inline-block;
}

谁能告诉我为什么背景图片在 IE 中不显示?它显示在所有其他浏览器中!

最佳答案

尝试使用

background-image:url('http://localhost/img/logo/purple.png');

关于html - Internet Explorer 中不显示背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23155771/

相关文章:

html - 如何定义 CSS 字体?

CSS Stripes,重复线性渐变错误

php - SASS 编译器自定义规则/异常(exception)

html - 如何在 Internet Explorer 中进行输入自动对焦?

javascript - jQuery - 在 highcharts div 上动态添加按钮

html - 使用 bootstrap css 时如何将按钮置于文本下方?

html - iPhone 的 "Add to Favorites"需要多大的图标大小?

javascript - HTML5 : Canvas performs too slow on lower end computers

javascript - IE7下拉菜单

javascript - 样式表不适用于网页 MEAN 堆栈