IE11 元元素打破 SVG [英] IE11 meta element Breaks SVG

查看:26
本文介绍了IE11 元元素打破 SVG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 SVG 文件数据直接嵌入到我的 html 中.它在 Chrome 和 Firefox 中显示,但在 IE11 中根本不显示.SVG 的 pastebin 链接是 http://pastebin.com/eZpLXFfD

I've embedded an SVG files data directly into my html. It shows in Chrome and Firefox, but in IE11 it doesn't show at all. The pastebin link to the SVG is http://pastebin.com/eZpLXFfD

我已尝试添加 META 标签,但无济于事.起初我认为这可能是 IE 兼容性视图问题,但切换该功能也不起作用.

I've tried adding a META TAG but to no avail. At first I thought it might be a IE Compatibility view issue, but toggling that feature did not work either.

有什么帮助吗?我还能提供什么信息来帮助回答这个问题

Any help? What else Information Can I provide to help answer this question

推荐答案

听起来好像您不是处于现代文档模式.当您处于标准模式时,Internet Explorer 11 可以很好地显示 SVG.确保如果您有 x-ua-compatible 元标记,请将其设置为 Edge,而不是较早的模式.

It sounds as though you're not in a modern document mode. Internet Explorer 11 shows the SVG just fine when you're in Standards Mode. Make sure that if you have an x-ua-compatible meta tag, you have it set to Edge, rather than an earlier mode.

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

您可以通过打开 F12 开发人员工具并检查文档模式下拉列表(见右上角,当前为Edge")或仿真选项卡来确定您的文档模式:

You can determine your document mode by opening up your F12 Developer Tools and checking either the document mode dropdown (seen at top-right, currently "Edge") or the emulation tab:

如果您没有 x-ua-compatible 元标记(或标题),请确保使用将文档置于标准模式的文档类型,例如 .

If you do not have an x-ua-compatible meta tag (or header), be sure to use a doctype that will put the document into Standards mode, such as <!DOCTYPE html>.

这篇关于IE11 元元素打破 SVG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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