html - 在 IE 7/8 中渲染 svg

标签 html internet-explorer svg

按钮在 FF、Chrome、Safari 中显示正常。不会在 IE 7/8 中呈现。

这是我得到的代码:

<!DOCTYPE html>
  <html>
    <head>
      <link rel="stylesheet" type="text/css" href="RadMenu.css">
    </head>
  <body>
     <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
     <g id="g" shape-rendering="inherit" pointer-events="all">
     <circle cx="400" cy="210" r="25.6" fill="white" stroke="#505055" strokewidth="2">
     </circle>
       <foreignObject x="383" y="192" width="32" height="32" id="PBtn16400210">
         <html>
         <body>
            <div class="Btn3D" title="" style="width: 101%; height: 100%; background-color:   rgb(218, 184, 82); text-align: center; vertical-align: middle; background-position: initial initial; background-repeat: initial initial;"></div>
         </body>
         </html>
      </foreignObject></g>
     </svg> 
   </body>
</html>

最佳答案

Internet Explorer 直到 v9 才支持 SVG(即使那时它也只是基本支持)。

关于html - 在 IE 7/8 中渲染 svg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16328629/

相关文章:

javascript - 确定 execScript 抛出错误的原因

reactjs - 使用 Velocity.js 从 URL 渲染 SVG 进行动画

javascript - 有没有办法在显然不支持此代码的浏览器中实现此效果?

html - 如何将两个div彼此相邻放置但仍处于中心

javascript - javascript/css需要转手机怎么说?

javascript - 如何像实际日期字段一样使用格式化日期

vba - 如何从特定类中获取特定链接?

jquery - IE 尝试解析 JSON 时出错

svg - 如何根据 d3.js 中的索引分配颜色?

html - 根据数据属性隐藏元素?