为什么以下代码在IE中不起作用?
渐变代码在IE中不起作用
background: -webkit-linear-gradient(#0B282F, white);
background: -o-linear-gradient(#0B282F, white);
background: -moz-linear-gradient(#0B282F, white);
background: linear-gradient(#0B282F, white);
过滤器在IE中无效。
filter: drop-shadow(5px 5px 100px #fff);;
-webkit-filter: drop-shadow(5px 5px 100px #fff);
filter: drop-shadow(5px 5px 100px #fff);
-o-filter: drop-shadow(5px 5px 100px #fff);
答案 0 :(得分:1)
参考:http://caniuse.com/#search=filter和http://caniuse.com/#search=gradient
IE 9,8不支持渐变。 IE 11,9,8不支持过滤属性。 在EDGE中,需要在"启用CSS过滤器属性"下启用它。标志。
答案 1 :(得分:0)
尝试使用IE中的渐变颜色可能会帮助你
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0b282f', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */