SVG fill color transparency / alpha?

后端 未结 5 1008
半阙折子戏
半阙折子戏 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:00

    fill="#044B9466"
    

    This is an RGBA color in hex notation inside the SVG, defined with hex values. This is valid, but not all programs can display it properly...

    You can find the browser support for this syntax here: https://caniuse.com/#feat=css-rrggbbaa

    As of August 2017: RGBA fill colors will display properly on Mozilla Firefox (54), Apple Safari (10.1) and Mac OS X Finder's "Quick View". However Google Chrome did not support this syntax until version 62 (was previously supported from version 54 with the Experimental Platform Features flag enabled).

提交回复
热议问题