Does IE9 support CSS linear gradients?

前端 未结 3 793
庸人自扰
庸人自扰 2020-11-29 04:52

With Chrome/Safari and Firefox there\'s the -webkit-gradient and -moz-linear-gradient properties. How can I do this same sort of thing with IE9?

3条回答
  •  失恋的感觉
    2020-11-29 05:08

    The best cross-browser solution is

    background: #fff;
    background: -moz-linear-gradient(#fff, #000);
    background: -webkit-linear-gradient(#fff, #000);
    background: -o-linear-gradient(#fff, #000);
    background: -ms-linear-gradient(#fff, #000);/*For IE10*/
    background: linear-gradient(#fff, #000);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff', endColorstr='#000000');/*For IE7-8-9*/ 
    height: 1%;/*For IE7*/ 
    

提交回复
热议问题