Chrome not rendering SVG referenced via

后端 未结 21 1662
孤独总比滥情好
孤独总比滥情好 2020-11-29 02:35

I am having issues with google chrome not rendering svg with an img tag. This happens when refreshing the page and initial page load. I can get the image to show up by \"

21条回答
  •  孤独总比滥情好
    2020-11-29 03:13

    A simple and easy way; according to https://css-tricks.com/forums/topic/svg-css-background-image-not-showing-in-chrome/ You have to open the .SVG file with a text editor (like notepad) and change

    xlink:href="data:img/png;base64,
    

    to:

    xlink:href="data:image/png;base64,
    

    it worked for me!

提交回复
热议问题