gpt4 book ai didi

html - 使用标签强制关闭 IE 兼容模式

转载 作者:bug小助手 更新时间:2023-10-28 10:54:58 31 4
gpt4 key购买 nike

我正在为一个在所有 Intranet 站点上强制使用兼容模式的客户工作。我想知道是否可以在我的 HTML 中添加一个标签来强制关闭兼容模式。

最佳答案

There is the "edge" mode .

<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My Web Page</title>
</head>
<body>
<p>Content goes here.</p>
</body>
</html>

从链接的 MSDN 页面:

Edge mode tells Windows Internet Explorer to display content in the highest mode available, which actually breaks the “lock-in” paradigm. With Internet Explorer 8, this is equivalent to IE8 mode. If a (hypothetical) future release of Internet Explorer supported a higher compatibility mode, pages set to Edge mode would appear in the highest mode supported by that version; however, those same pages would still appear in IE8 mode when viewed with Internet Explorer 8.

但是,在生产环境中不鼓励使用“边缘”模式:

It is recommended that Web developers restrict their use of Edge mode to test pages and other non-production uses because of the possible unexpected results of rendering page content in future versions of Windows Internet Explorer.

老实说,我不完全明白为什么。但据此,目前最好的方法是使用 IE=8

关于html - 使用标签强制关闭 IE 兼容模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3449286/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com