【问题标题】:SVG Opera 12 ctrl zoomSVG Opera 12 ctrl 缩放
【发布时间】:2014-10-13 06:56:53
【问题描述】:

如果您在 Opera 12 中使用 ctrl 单击 svg,则 svg 会放大。如何防止这种行为? 我需要用 ctrl 点击 svg 而不放大它。

SVG example

【问题讨论】:

    标签: svg opera


    【解决方案1】:

    您可以使用根 元素上的 zoomAndPan 属性来禁用 UA 缩放和平移。

    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg width="12cm" height="4cm" viewBox="0 0 1200 400"
         xmlns="http://www.w3.org/2000/svg" version="1.1" zoomAndPan="disable">
      <desc>Example rect01 - rectangle with sharp corners</desc>
    
      <!-- Show outline of canvas using 'rect' element -->
      <rect x="1" y="1" width="1198" height="398"
            fill="none" stroke="blue" stroke-width="2"/>
    
      <rect x="400" y="100" width="400" height="200"
            fill="yellow" stroke="navy" stroke-width="10"  />
    </svg>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-19
      • 2013-01-29
      • 1970-01-01
      • 1970-01-01
      • 2018-06-04
      • 2017-01-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多