<svg width="2000" height="2000"> <circle cx="80" cy="80" r="50">here the svg height and width is associated with which thing? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

<svg width="2000" height="2000"> <circle cx="80" cy="80" r="50">here the svg height and width is associated with which thing?

Svg

29th Apr 2017, 9:32 AM
Amir Abbas
Amir Abbas - avatar
6 Answers
+ 6
The "width" and "height" attribut of <svg> element define the size. The default unit is the pixel, but can be em, ex, px, pt, pc, cm, mm. The "viewport" attribute allow to redefine the unit in the svg scope, as vector graphics are virtually infinite sizing: <svg width="1000" height="500" viewport="0 0 100 500"> ... will have a scale of 1/10. More verbose explanation here: http://tutorials.jenkov.com/svg/svg-viewport-view-box.html
29th Apr 2017, 10:03 AM
visph
visph - avatar
+ 1
do you mean the unit of measurement? that would be pixels by default.
29th Apr 2017, 9:34 AM
Mario L.
Mario L. - avatar
0
no the svg width and height is associated with circle or something else?? coz the radius of tge circle is given in circle tag
29th Apr 2017, 9:35 AM
Amir Abbas
Amir Abbas - avatar
0
usually associated with a rectangle. Maybe go with Mario I am a bit out of date with css. Like he said a size in width and height can be bypassed for px size when dealing with svg
29th Apr 2017, 9:36 AM
James
James - avatar
0
no prblem thnx anyways
29th Apr 2017, 9:38 AM
Amir Abbas
Amir Abbas - avatar
0
thnx @visph
29th Apr 2017, 10:04 AM
Amir Abbas
Amir Abbas - avatar