Can you use rgba colours in gradients produced with Internet Explorer’s filter property?

后端 未结 1 1485
醉梦人生
醉梦人生 2020-12-19 23:02

Internet Explorer’s filter CSS property (-ms-filter from IE 8) allows you to do CSS gradients, a bit like the -webkit-gradient and

相关标签:
1条回答
  • 2020-12-19 23:14

    Stop colors can be specified in #AARRGGBB notation, where AA represents the alpha. For example, #ffff0000 is fully-opaque red.

    This produces a 100% red to 50% black horizontal gradient:

    filter: progid:DXImageTransform.Microsoft.Gradient(
        GradientType=1, 
        StartColorStr='#ffff0000', 
        EndColorStr='#80000000'
    );
    

    jsFiddle preview

    0 讨论(0)
提交回复
热议问题