how to change svg fill color when used as base-64 background image data?

前端 未结 3 1639
暖寄归人
暖寄归人 2020-12-15 04:03

I\'m using SVG for a project, loaded in css like this:

background-image: url(\'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/20         


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-15 04:12

    Use filter property of CSS. For me I wanted to change the color of the icon to white on Hover:

    filter: grayscale(1) brightness(2);
    

提交回复
热议问题