How to make background-image with linear-gradient work on IE 11?

后端 未结 4 513
旧巷少年郎
旧巷少年郎 2020-12-11 01:04

Any idea how I can make background-image with linear-gradient to work on IE 11?

The following code works fine on IE 10 but doesn\'t work on

4条回答
  •  佛祖请我去吃肉
    2020-12-11 01:25

    Maddening, isn't it?

    Prior to IE 11,

    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cccccc');
    

    For IE 11:

    background-image: -ms-linear-gradient(top, #FFFFFF 0%, #CCCCCC 100%);
    

    That's right folks, we not only have to worry about supporting older IEs, apparently we'll now have to deal with NEWER IE quirks as well...

提交回复
热议问题