Any ideas why patterned SVG file is showing up blank in the browser?

后端 未结 3 1790
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-25 08:07

I have an svg file that I created in Illustrator that consists of a pattern - it was made using the swatch tool. When I try and load it locally it shows up blank in the browser

3条回答
  •  暖寄归人
    2021-01-25 08:26

    If you find that it works in Firefox, IE or Edge but not Chrome, this was my issue too.

    I fixed it by opening the .SVG file in a text editor, and everywhere I saw this tag:

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

    I replaced it with

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

    This fixed it, and it displayed immediately. Hopefully this helps someone!!

提交回复
热议问题