Answer the question
In order to leave comments, you need to log in
svg alignment?
Insert svg icon from sprite.
how to press it to the left edge without setting a fixed width of the svg (there are several icons, they have different widths)?
<svg>
<use xlink:href="img/sprite.svg#payment1"></use>
</svg>
Answer the question
In order to leave comments, you need to log in
Here you can try to set the attribute only for symbols preserveAspectRatio="xMinYMin"
.
The character in the sprite will look something like this:
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="payment1" viewBox="0 0 48 48" preserveAspectRatio="xMinYMin">
<path d="M24,0C10.745,0,0,10.746,0,24c0,13.255,10..."/>
</symbol>
</svg>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question