【问题标题】:svg is not working with IE?svg 不适用于 IE?
【发布时间】:2011-03-31 15:17:45
【问题描述】:

我正在尝试在 IE 中打开此网站:

http://www.petercollingridge.co.uk/data-visualisation/interactive-svg-map

但不知何故,它没有显示 SVG。

如何让它与 IE 一起工作?

【问题讨论】:

标签: internet-explorer svg


【解决方案1】:

IE 不支持 SVG(9 之前的所有版本) IE 9 **将*支持 SVG,但在那之前你可以找到 plugin for your IE

【讨论】:

【解决方案2】:

如果您发现您的页面无法在 ASV 中运行,而在 Chrome 中运行(看起来确实如此),我建议您改为使用 Google Chrome Frame。要使用它,请安装以下元标记并将其添加到页面头部:

<meta http-equiv="X-UA-Compatible" content="chrome=1">

【讨论】:

    【解决方案3】:

    Web 应用程序需要如下标签:

    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    

    【讨论】:

      【解决方案4】:

      IE 9 以下不支持 SVG 组件,IE 8 及以下支持 VML 但要使 SVG 在最新版本的 IE 中工作,您只需在 html 文件头中输入以下代码

      <meta http-equiv="X-UA-Compatible" content="chrome=1">
      <!--[if IE]>
      <script type="text/javascript"
      src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
      
      <style>
       .chromeFrameInstallDefaultStyle {
        position:fixed;
        overflow:auto;
        width: 800px; /* default is 800px */
        height: 80%; /* default is 800px */
        border: 5px solid blue;
        right:100px;
        bottom:100px;
        z-index: 99999 !important;
       }
      </style>
      
      <div id="prompt">
        <!-- if IE without GCF, prompt goes here -->
      </div>
      
      <script>
          // The conditional ensures that this code will only execute in IE,
          // Therefore we can use the IE-specific attachEvent without worry
          window.attachEvent("onload", function() {
              CFInstall.check({
                  mode: "inline", // the default
                  node: "prompt"
              });
          });
      </script>
      <![endif]-->
      

      这将要求用户在 IE 上安装 google 框架。只需几分钟。之后,所有 html5 组件以及 SVG 组件都可以正常工作。 “大部分”

      【讨论】:

        猜你喜欢
        • 2017-10-05
        • 1970-01-01
        • 1970-01-01
        • 2015-04-14
        • 1970-01-01
        • 2017-05-26
        • 2011-06-10
        • 2012-03-28
        • 1970-01-01
        相关资源
        最近更新 更多