[英]How to resize a svg to fit inside a div?
Don't use width
or height
in your SVG. 不要在SVG中使用
width
或height
。
Use viewbox
instead. 请改用
viewbox
。 Then the SVG will scale automatically (mostly). 然后SVG将自动缩放(大部分)。
<svg xmlns="http://www.w3.org/2000/svg" viewbox ="0 0 959 593">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.