作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经为 div 编写了 CSS 添加背景图像,该图像在 FF、CH 上可见,...但是,它在 IE 8 上不显示
CSS文件
#headerrotetor{
width: 100%;
max-width: 1600px;
max-height: 660px;
background-image: url(images/hm_bg.jpg);
background-repeat: no-repeat;
margin: 0 auto;
background-size:contain;
}
而且我已经为 IE 维护了文件中的 CSS
#headerrotetor{
height: 660px;
width: 1600px;
}
背景图片大小340Kb,谁能帮帮我,谢谢
最佳答案
您使用的路径是否正确?
尝试将背景应用到 body 标签。下面的代码支持 IE 4.0 以上版本。
body {
background-image: url('paper.gif');
background-repeat: no-repeat;
background-position: right top;
}
注意:IE8 及更早版本不支持一个元素上的多个背景图像。
关于html - 如何为 IE 8 添加 CSS 背景图片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25926018/
我是一名优秀的程序员,十分优秀!