我有一个 div,其类别为“gradient_back”,我已向其应用了背景。 div 在 chrome 和 mozilla 中看起来不错。 但在 ie8 中,它不会根据需要进行扩展。
这是“gradient_back”类:
.gradient_back{
width:100%;
float:left;
background:url(images/gradient.gif) repeat-x 0 0;
background-size:auto 100%;
}
我不理解 ie8 中的这种奇怪行为。请帮我解决问题。
最佳答案
I am not understanding this weird behaviour in ie8.
Internet Explorer 的第一个版本support background-size
是第 9 版。
Please help me resolve the problem.
我会使用 CSS gradients并在旧版浏览器中回退到纯色。
或者,您可以尝试将背景图像定位在 100% 100%
并且不缩放它。
关于html - IE8 中的背景图像外观,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16272667/