我想减少不必要的 div 的使用,所以我使用了多重背景。但是在ie9中好像不行。
background: url(../images/home-2000.jpg) no-repeat -webkit-calc(50% - 200px) top, -webkit-linear-gradient(0deg, #dfe2e7 50%, white 50%);
background: url(../images/home-2000.jpg) no-repeat calc(50% - 200px) top, linear-gradient(90deg, #dfe2e7 50%, white 50%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfe2e7', endColorstr='#ffffff',GradientType=1 );
-webkit-background-size: auto 100%;
background-size: auto 100%;
最佳答案
IE9 不支持 CSS 渐变:http://caniuse.com/#feat=css-gradients
您可以使用此工具添加 IE9 渐变支持:http://www.colorzilla.com/gradient-editor/ 它创建一个 svg 图像,允许您嵌入到 css 中。
关于css - 在多个背景中混合 calc() 和线性渐变在 ie9 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20449122/