【问题标题】:Resize svg image put inside html5调整放入 html5 中的 svg 图像大小
【发布时间】:2012-01-04 20:10:51
【问题描述】:

我有一个带有 svg 图片的 html5 网页。
当我拖动改变水平尺寸时,svg 图像的尺寸也会改变,但是如果我改变浏览器的垂直尺寸,svg 图像的尺寸不会改变。
谁能告诉我为什么会这样?

【问题讨论】:

标签: html svg


【解决方案1】:

您有 preserveAspectRatio 属性,该属性负责将图像定位在视图框中。下面是与 SVG 图的链接,显示了这些属性如何管理图像的位置。 看看http://www.w3.org/TR/SVG/images/coords/PreserveAspectRatio.svg

preserveAspectRatio 属性的详细解释/参考在这里:http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute

干杯!

【讨论】:

  • 是的,对,这些属性使svg在窗口调整大小时改变大小。谢谢
猜你喜欢
  • 2012-12-05
  • 2013-07-13
  • 2013-08-20
  • 2011-05-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-04-29
  • 1970-01-01
相关资源
最近更新 更多