Gradient not working in IE 10/11

2019-02-25 03:08发布

问题:

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); 
}

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

Any ideas?

Thanks in advance

回答1:

Internet Explorer 10+ uses the standard syntax:

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


回答2:

DX filters are no longer supported for IE 10+ in standard mode. Use linear-gradient.