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

查看:196
本文介绍了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 TAG但无济于事。起初我认为它可能是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.

< meta http-equiv = X-UA兼容内容=IE = 8>

任何帮助?我可以提供哪些其他信息来帮助回答这个问题

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 元标记(或标题),请务必使用将文档置于标准模式的文档类型,例如<!DOCTYPE html>

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天全站免登陆