SVG data image not working on Firefox or Chrome 72+

前端 未结 4 883
轮回少年
轮回少年 2020-11-22 16:43

I\'m setting a SVG as background-image for a pseudo element:

content: \'\';
position: absolute;
 right: 0;
bottom: 0;
  left: 0;
width: 100%;
he         


        
4条回答
  •  情深已故
    2020-11-22 17:01

    For anyone having this encoding issue when trying to use url with sass variables (for fills, for instance), the following is quite useful: https://gist.github.com/JacobDB/0ffffaf8e772c12acf7102edb8a302be

    Note, you may need to edit the output url from inline-svg depending on your needs (in my case, I was using data:image/svg+xml;utf8 instead)

提交回复
热议问题