Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet explorer SVG未在IE 11中显示_Internet Explorer_Svg_Rendering_Blogger - Fatal编程技术网

Internet explorer SVG未在IE 11中显示

Internet explorer SVG未在IE 11中显示,internet-explorer,svg,rendering,blogger,Internet Explorer,Svg,Rendering,Blogger,我在我的应用程序中使用了来自的几个svg图像。svg图像在Chrome和Firefox中正确显示。但是,当我看到网站是IE11时,图像如下所示。我从SO和其他网站上尝试了一些技巧,但没有任何区别 这个网站是用blogger建立的。下面是相应的html代码 <a href="http://www.thecloudavenue.com/search/label/gettingstarted"> <img src="http://openclipart.org/people/

我在我的应用程序中使用了来自的几个svg图像。svg图像在Chrome和Firefox中正确显示。但是,当我看到网站是IE11时,图像如下所示。我从SO和其他网站上尝试了一些技巧,但没有任何区别

这个网站是用blogger建立的。下面是相应的html代码

<a href="http://www.thecloudavenue.com/search/label/gettingstarted">
   <img src="http://openclipart.org/people/shokunin/runer_start.svg" style="border: none" height="110" width="110" align="middle"/>
</a>


如何避开这个问题?如果我用其他类型替换svg,那么它应该可以工作。但是,我很好奇为什么svg会被显示出来。

IE对svg的支持在几个方面偏离了标准。以下是一些:

  • 标记元素的属性在引用点继承,而不是从
    标记
    元素的祖先继承
  • 不支持
    路径长度
    属性
  • 片段规范中
    viewBox
    元素的参数除了逗号外,还可以用单个空格分隔
  • display
    属性影响
    pattern
    元素和对这些
    模式
    元素的引用
  • 不支持SMIL动画。此外,不支持在的其他章节中引用
    动画
    元素、属性、属性、接口或数据类型
  • 对于可以设置动画的数据类型,
    animVal
    属性的默认设置为
    animVal=baseVal
参考资料


您需要像下面这样的东西来声明包含图像标记的svg容器。这个示例有两个图像,因此我可以使用Javascript切换活动/非活动条件。您还必须手动关闭图像标记,“IE中不允许使用自动关闭标记

<svg id="globalNav_icon_usersSearch" height="20" width="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <image class="icon_search" x="0" y="0" height="20" width="20"  xlink:href="svg/icon_search.svg"></image>
        <image class="icon_search_grey" x="0" y="0" height="20" width="20"  xlink:href="svg/icon_seacrh_grey2.svg"></image>
      </svg>

此外,您还可以使用location.href Javascript调用来执行锚定功能。