Why doesn't this SVG graphic scale in IE9 and 10 (preview)?

后端 未结 4 1669
-上瘾入骨i
-上瘾入骨i 2021-02-04 16:56

According to IE website SVG is supported. And according to this answer too What are SVG (Scalable Vector Graphics) supported browsers?

http://jsfiddle.net/jitendravyas/2

4条回答
  •  孤独总比滥情好
    2021-02-04 17:19

    The problem is that you are using percentages for height and width, as explained here (http://www.seowarp.com/blog/2011/06/svg-scaling-problems-in-ie9-and-other-browsers/).

    If the width and height are either defined as something as useless as 100% or if they aren’t defined at all, these browsers will make a guess as to what the dimensions ought to be based on the points and shapes defined in the body of the SVG file.

    Change to width=480 and height=360 and you should be fine.

提交回复
热议问题