M
M
microf2017-10-15 09:00:15
SVG
microf, 2017-10-15 09:00:15

How to deal with viewBox?

Good afternoon. Help with viewbox. Google didn't ban me, but I can't figure it out. There is a picture that I want to insert into the code so that it takes up the maximum space allocated to it plnkr.co/edit/wJvXTnMaiJ7kolMvNbdp?p=preview

<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" height="497px"
     version="1.1"
     style="clip-rule:evenodd"
x="0" y="0" viewBox="0 0 21000 29000" 
 xmlns:xlink="http://www.w3.org/1999/xlink">

In the original document made by the designer, viewBox="0 0 21000 29000"
if I decrease the size of the viewBox, then, in theory, the image should increase, but for some reason this does not happen. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2017-10-15
@microf

https://www.sarasoueidan.com/blog/svg-coordinate-s...
If by "occupies the maximum amount of allocated space" you mean that the shape fits within the rectangle you're allocating for marginless SVG, then you're best off generally get rid of the viewbox and its corresponding coordinate system different from the viewport (that is, regenerate the image without borders, at least).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question