IE - 防止Iframe中的兼容模式 [英] IE - Prevent compatibility mode in an Iframe
问题描述
如果我在 iframe中使用以下meta $> c $ c> html,这不起作用:
< meta http-equiv =X-UA兼容content = IE = 11; IE = 10; IE = 9; IE = 8; IE = 7; IE = EDGE/>
这取决于您是否有权访问x-与宿主(父母)的ua兼容元。当主机页面处于IE9模式或更高版本时,其状态强加在iframe上。这是一个很好的解释,由MS-Connect的主持人给出。
https://connect.microsoft.com/IE/feedback/details/1047106/when-webpage-emulates-ie-5-embedded- iframe-shows-ie-8
以下是关于Quirks模式如何以IE10开头的两种方式的补充信息。
https://msdn.microsoft.com/library/hh869300(v = vs.85).aspx 这是一个现场演示,它允许即时更改IE模式。
它是修补,还允许选择iframe网址。
https://googledrive.com/host/0B8BLd2qPPV7XfnZQRk1JSkg5cFVMbGI1QkZVclVBbUtWZnV2bmczUHpSaVJmSXBOdUg2ek0/toggle-IE-compat-and-quirks-modes.html 结果
Is it possible to disable the IE compatibility mode from within an Iframe?
If I use the following meta in the iframe
html, this not working:
<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
It depends on if you have access to the x-ua-compatible meta of the host (parent). When the host page is at IE9 mode or above, its state is imposed on the iframe. Here's a good explanation, given by a moderator at MS-Connect.
https://connect.microsoft.com/IE/feedback/details/1047106/when-webpage-emulates-ie-5-embedded-iframe-shows-ie-8
Here's supplemental info about how Quirks mode forked two ways beginning with IE10.
https://msdn.microsoft.com/library/hh869300(v=vs.85).aspx
Here's a live demo which allows changing the IE modes on-the-fly.
It was patched to also allow selecting the iframe url.
https://googledrive.com/host/0B8BLd2qPPV7XfnZQRk1JSkg5cFVMbGI1QkZVclVBbUtWZnV2bmczUHpSaVJmSXBOdUg2ek0/toggle-IE-compat-and-quirks-modes.html
这篇关于IE - 防止Iframe中的兼容模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!