[英]Why background-image doesn't work in IE9?
This is the website: 这是网站:
http://loveloverun.com/test/love_run/ http://loveloverun.com/test/love_run/
I checked and it works properly in chrome and firefox. 我检查了一下,它在chrome和firefox中正常工作。 The problem is that in IE9 the background image only works on the body level.
问题在于,在IE9中,背景图片仅在身体水平上起作用。
Here is my css: 这是我的CSS:
body {
font-family : Open Sans;
min-height: 0px;
background: url("../img/front/bg.png") repeat;
height:auto;
}
And the other div eg container 还有另一个div,例如容器
.container {
width: 1022px !important; /*1302px*/
background-color:#ffffff;
background-clip:content-box;
}
and one more example (footer): 还有一个示例(页脚):
#enquiry {
color:#ffffff;
background: url("../img/front/black.png") repeat;
}
I checked the doc type and it's not missing any tag. 我检查了文档类型,没有丢失任何标签。
And also some other places are different from the chrome / firefox one, so I wonder: 而且其他一些地方与chrome / firefox的地方有所不同,所以我想知道:
1) Are there any plugin to enhance the compatibility? 1)是否有任何插件可以增强兼容性? I tried modernizer, but it seems to have no effect.
我尝试过现代化器,但似乎没有效果。
2) How can background problem be solved for IE9? 2)如何解决IE9的后台问题?
Update: 更新:
body {
font-family : Open Sans;
min-height: 0px;
background-image: url("../img/front/bg.png");
background-repeat: repeat;
height:auto;
}
still the same result 还是一样的结果
Update 2: 更新2:
Screen cap in ie9 ie9中的屏幕盖
Use 采用
background-image: url(/image.whatever);
instead of the 而不是
background: url (); code
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.