渐变在IE 10/11中不起作用 [英] Gradient not working in IE 10/11

查看:81
本文介绍了渐变在IE 10/11中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里,我的CSS可以在任何浏览器中使用渐变,包括IE直至版本9(IE9):

here my CSS to get the gradient working in any browser, inlcuding IE up to version 9 (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。

It won't work for IE 10/11 though.

有什么想法吗?

预先感谢

推荐答案

Internet Explorer 10+使用标准语法

Internet Explorer 10+ uses the standard syntax:

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

这篇关于渐变在IE 10/11中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆