The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS iOS does not work with SVG fragment identifier for CSS background image

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #245182

    I’m using SVG sprite and referencing fragment identifiers in it for CSS background image. The CSS code looks like this: background: url(sprite.svg#icon-1);.

    It works on Firefox/Win7, Google Chrome/Win7, IE11/Win7, IE10/Win8, and Android 4.4.3. However, it does not work on iOS 9.3.4.

    Here is a demonstration on Plunker. (And here is a shorter url for easier accesses for mobile devices:

    Is it possible to get iOS working with this method?


    Doesn’t look like it, but there are workarounds


    @Beverleyh Thank you very much. It looks like there is no pure CSS/SVG way to make it work.

    Fortunately, I found a polyfill which fixes this issue.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.