SVG fill color transparency / alpha?

后端 未结 5 1023
半阙折子戏
半阙折子戏 2020-11-29 15:40

Is it possible to set a transparency or alpha level on SVG fill colours?

I\'ve tried adding two values to the fill tag (changing it from fill=\"#044B94\"

5条回答
  •  伪装坚强ぢ
    2020-11-29 16:10

    As a not yet fully standardized solution (though in alignment with the color syntax in CSS3) you can use e.g fill="rgba(124,240,10,0.5)". Works fine in Firefox, Opera, Chrome.

    Here's an example.

提交回复
热议问题