Answer the question
In order to leave comments, you need to log in
How to make svg scalable?
I can't get my svg element to stretch. I tried through classes - in none
In the body I placed the code:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" style="display:none">
<symbol id="svg-logo" class="svg-logo" viewBox="0 0 670 360" fill="none">
<path d="M 40,40 H 600 L 530,180 600,320 H 40 z"/>
<text class="text label-1" fill="none" stroke="black" stroke-width="2px" style="font-size:40px;letter-spacing: 11px;" x="80" y="160">декор-центр</text>
<text class="text label-1" fill="black" x="80" y="240">АРТ-СЕРВИС</text>
</symbol>
</svg>
<div class="main-logo">
<svg class="main-svg-logo"><use xlink:href="#svg-logo"></use></svg>'
</div>
Answer the question
In order to leave comments, you need to log in
Max-width specifies the maximum size condition, not the size. For 100% size it needs to set width:100%.
The svg-shka itself needs to be set the size in the ratio (right in the tag), and it is already, like a regular picture, to specify the width of 100%, and the height “as it goes”.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question