gpt4 book ai didi

cross-browser - 如何禁用 IE9 中的兼容模式按钮?

转载 作者:行者123 更新时间:2023-12-04 02:42:33 25 4
gpt4 key购买 nike

我无法禁用 IE9 中的 IE 兼容模式按钮。

我的头部和文档类型如下所示:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--[if lte IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-en" xml:lang="en-en" class="ie8">
<![endif]-->
<!--[if IE 9]>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-en" xml:lang="en-en" class="ie9">
<![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-en" xml:lang="en-en">
<!--<![endif]-->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="meta content here" />
</head>
<body>
<!-- page content here //-->
</body>
</html>

如何禁用 IE9 中的兼容模式按钮?

我以为我做了我的研究。我应用了各种后备解决方案,以在每个 IE 中从 7 到 9 及更高版本正常显示所有内容。

客户端提示兼容模式在激活时会弄乱布局。有什么办法可以禁用那个按钮吗?

最佳答案

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

Chrome frame has been discontinued by Google as of Jan 2014 so the chrome=1 part is not required


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

IE 中的“edge”强制标准模式(或最新的渲染引擎),“chrome”用于 Chrome Frame。

此处提供更多信息:
  • Which X-UA-Compatible mode should I be using?
  • Beyond DOCTYPE: Web Standards, Forward Compatibility, and IE8
  • 20 Snippets You should be using from Html5 Boilerplate
  • 关于cross-browser - 如何禁用 IE9 中的兼容模式按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6881958/

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