S
S
Skrolea2016-02-23 19:43:02
JavaScript
Skrolea, 2016-02-23 19:43:02

How does svg "work"?

Good afternoon. I need to insert an svg image of a man or a woman, depending on the choice of gender.
Here also there was a question.
I downloaded an svg image of a woman and I don't know how to insert it so that it scales to 100% width and height. It's not entirely clear to me about the viewport and width and height.
If I make the viewport 0 0 300 500 - does this mean that the width and height must be no more than these values, otherwise the image will "crawl" out of bounds? And how to make the image constant at 100% height (and scale it to different resolutions)?
What do you want - click here

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2016-02-23
@petermzg

viewport specifies which image dimensions were applied when creating. You don't need to change them unless absolutely necessary.
width and height are the sizes for display, and set them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question