我有一个元素有一个背景图像,除非你在 ) 和不重复之间放置一个空格,否则它不会在 IE 中显示。当你放置那个空间时,它确实显示但被扭曲了。此背景图片适用于 Firefox 和 Chrome。
实时链接:http://www.mastisolcostanalysis.com/survey
CSS:
#app-wrapper{
width: 1024px;
height: 768px;
min-height:100%;
margin: 0px auto;
/*margin-top: -384px;
position: relative;
top: 50%;*/
text-align: left;
background: url(../img/ui-frame.png)no-repeat;
overflow: hidden;
background-size: 100%;
}
任何帮助将不胜感激!
最佳答案
我发现问题出在背景图片上,这是尺寸问题。它是 2048 x 1536。
http://www.mastisolcostanalysis.com/img/ui-frame.png
您应该将其大小调整为您在#app-wrapper 上定义的 1024 x 768。
IE8 无法像现代浏览器那样缩放图像。
关于html - 背景图像不会在 IE8 或更低版本中显示,但在 Firefox 和 Chrome 中有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18705893/