IE 10/11中渐变效果不起作用

3

这是我的CSS代码,可以让渐变效果在任何浏览器中都能正常显示,包括IE9及以下版本:

.wrapper { 
    background:-moz-linear-gradient(top , #0f1925, #000) repeat scroll 0 0 transparent;                                      
    background:-o-linear-gradient(top , #0f1925, #000) repeat scroll 0 0 transparent; 
    background:-webkit-linear-gradient(top , #0f1925, #000) repeat scroll 0 0 transparent; 
    filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#0f1925', endColorStr='#000', GradientType=0); 
}

不过,IE 10/11不支持该功能。

有什么想法吗?

提前感谢。


我也遇到了IE和渐变的一些问题。我使用了这个网站,它帮了我很多:http://www.colorzilla.com/gradient-editor/ 祝你好运! - Gooey
2个回答

5

Internet Explorer 10及以上版本使用标准语法

background-image: linear-gradient(to top, #000, #FFF);

1

在标准模式下,IE 10+不再支持DX滤镜。请使用linear-gradient


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接