css - 背景图像 css 在 IE7、IE8 中不显示

标签 css internet-explorer-8 internet-explorer-7

我正在尝试使用 css 为 div 提供背景图像。这是我的 CSS

.header {
    background: url("../images/header1.png") no-repeat scroll right 15px rgba(0, 0, 0, 0);
    height: 55px;
    padding: 5px 0 0;
    width: 100%;
}

即使在 IE9 和 IE10 上,这在 firefox 和 chrome 上也能正常工作,但它在 IE8 或更早版本中不起作用。我用谷歌搜索并也提到了这个问题,但它没有帮助。

Background image not showing IE8

最佳答案

 .header
    {
    background: url("../images/header1.png");
    background-repeat:no-repeat;
    background-position:right 15px;
    height: 55px;
    padding: 5px 0 0;
    width: 100%;
    }

关于css - 背景图像 css 在 IE7、IE8 中不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21159472/

相关文章:

javascript - 使用 jQuery 更新 flashvars 并重新加载 flash

javascript - ie7 无法使用 javascript 循环遍历字符串

javascript - 如何从 iframe 中获取当前 iframe 偏移量?

div 内的 CSS 定位

javascript - 在 CSS 中将一个背景图像置于另一个背景图像之上

html - CSS 选择器前后的 IE8 z-index

visual-studio-2008 - 在 Release模式下 Internet Explorer 8 崩溃后,我需要调试我的 BrowserHelperObject (BHO)(在 C++ 中使用 Visual Studio 2008)

css - IE 7 显示隐藏和不显示元素

html - 网站在手机上显示空白

html - 三列等高,底部按钮和响应式