Answer the question
In order to leave comments, you need to log in
How to scale icon from SVG sprite displayed in background?
Packed all my SVG icons into one sprite. I want to display one of the icons in background
a size smaller than in the SVG itself, but it does not work.
The only thing that worked was to output as output, and then apply Like transform: scale();
this:
.my-div:before {
content: '';
position: absolute;
left: 5px;
top: 5px;
height: 72px;
width: 72px;
background-image: url('../img/icons.svg');
background-repeat: no-repeat;
background-position: 0 -397px;
transform: scale(0.52);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question