Answer the question
In order to leave comments, you need to log in
How to fit an SVG block to a USE block in size?
In general, the SVG block is always larger than the USE block. I can't get the size right.
https://codepen.io/papagis/pen/XWaprKz
Answer the question
In order to leave comments, you need to log in
Since your SVG is rectangular, it fits only in the side view mode, and in all other cases it pops out and saves us if we write this in .bbb. preserveAspectRatio="none" viewBox="0 0 24 24"
That is, like this:
<svg class="bbb" preserveAspectRatio="none" viewBox="0 0 24 24" style="max-height: 99vh;display: block; margin: auto;">
<use xlink:href="#filtra1" />
</svg>
.bbb {
height: 100px;
width: 100px;
};
<svg class="icon_userpic" viewBox="0 0 32 32">
svg:not(:root) {
overflow: hidden;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question