SVG无法呈现IE 11 [英] SVG not rendering IE 11

查看:211
本文介绍了SVG无法呈现IE 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在此处中找到了html代码. svg无法使用IE 11呈现.找不到原因.

I've the html code here. The svg does not render with IE 11. Can't find out why.

我已添加到另一个地方:

I've added as seen in another place :

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

我怀疑图像在这里,但看不到.或者它可能是大的data=,无法正确解释.如何检查?

I suspect the image is here but not visible. Or it could be the large data= which is not interpreted correctly. How to check ?

推荐答案

我为使其正常工作所做的事情:

What I've done to make it work :

svg文件中:

In the svg file :

  1. 添加<?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. 添加<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/SVG/DTD/svg10.dtd">
  3. 删除height& width属性
  4. svg标记中添加xmlns="http://www.w3.org/2000/svg"
  1. add <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. add <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/SVG/DTD/svg10.dtd">
  3. remove height & width properties
  4. add xmlns="http://www.w3.org/2000/svg" in the svg markup

html文件中:

In the html file :

  1. 使用img元素代替object:<img src="..." style="width:95%;height:60%" />
  1. use an img element instead of object : <img src="..." style="width:95%;height:60%" />

这篇关于SVG无法呈现IE 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆