Forums

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

Home Forums CSS Can SVG sprites work in CSS? Reply To: Can SVG sprites work in CSS?

#266085
grimski
Participant

Sorry, basically how you would normally set a background-image in a CSS file. Like this…

.item {
    background-color: black;
    background-image: url(...img/sprite/sprite.svg#icon-phone);
    background-repeat: no-repeat;
    background-size: 20px;
}

Yeah I don’t think it’s possible either but I just thought I’d ask as it’d save me having duplicated images! :)