A
A
Azat S.2015-10-08 18:19:00
Web development
Azat S., 2015-10-08 18:19:00

Why is the original size of the SVG displayed incorrectly?

Can you please tell me why if you add svg through , then it turns out that the original image size is 300 x 150 pixels?
codepen.io/azat-io/pen/mewRWb
I don't see any mention of any 300x150 anywhere.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2015-10-08
@webinar

SVG is programmable graphics. Dimensions can be inside the svg code, and you can change them through css.

P
Pavel Volintsev, 2015-10-08
@copist

I didn't see anything about 300x150 in your example.
Regarding SVG
view-source: http://azat-test.webtm.ru/myworld.svg
1. It has its own size, determined by the internal content, that is, curved lines and primitives.
Example:
There are a lot of points in a complex curve here.
2. The file contains a specific image size
<svg xmlns=" www.w3.org/2000/svg " version="1.1" viewbox="0 0 1009 651" width="1009" height="651" >
All elements of this images are scaled to the specified size

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question