Svg with image inside is not showing in safari

后端 未结 5 1282
太阳男子
太阳男子 2021-02-05 20:33

Inside my website, I am embeding a few svgs. They all seem to work just fine in Chrome, Firefox, IE(9+) and in Safari. Howvere as soon as there is image included in the svg, saf

5条回答
  •  别那么骄傲
    2021-02-05 20:51

    I ran into this problem where I was using Ajax to load the svg spritesheet onto the page. If I had a on the page before the spritesheet was loaded, it would fail and would not resolve once the spritesheet was avaialble. Any added to the dom after the spritesheet was loaded were fine. I had to delay putting the items in the dom until after the spritesheet finished loading.

    This only affected IOS. All other browsers didn't care about the order.

提交回复
热议问题