Forums

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

Home Forums CSS SVG Sprite Symbols as CSS Content or Background? Reply To: SVG Sprite Symbols as CSS Content or Background?

#250594
thejamesnash
Participant

Yep, it is possible using Fragment identifiers. The implementation you’re using requires the CSS:

.title:after {
    background-image: url(directory/path-to-svg-sprite.svg#arrow-right);
}

That should do it! Example here: http://codepen.io/rgba/pen/EZbVLR

The caveat is that the current version of Safari doesn’t support fragment identifiers within CSS.