我对此感到困惑。我有一个带有下拉菜单的页面。它在IE10和11 (也在其他浏览器中)中的行为是正确的,但在IE9中的行为不同。
我有两种方式访问我的网站的网页:通过计算机IP地址,如:
http://123.456.789.12/page.html另一种方法是通过计算机名,例如:
http://computer-name.com/page.html当我使用IP地址并将鼠标移到菜单上时,显示是正确的(下拉菜单):

但是,如果使用计算机名,我会得到以下内容:

我清除了缓存,验证了它们是相同的页面,等等。我不知道为什么在IE9中,它有这样的行为。
有人知道为什么吗?修复?
谢谢和问候。
更新:这是我的页面的头
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/reset.css">
<link rel="stylesheet" href="/lib/font-awesome-4.1.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/styles.css" />
<script src="/lib/modernizr-2.6.2.min.js"></script>
<script src="/lib/jquery-1.11.0.min.js"></script>
<script src="/lib/jquery-ui-1.10.4/js/jquery-ui-1.10.4.js"></script>
</head>更新2:在SO!上找到解决方案
Html 5 Reset (html5reset.org) - X-UA-Compatible doesn't work
发布于 2014-08-12 13:47:48
这是smart defaults的一部分,它在站点的两个实例之间切换Browser/Document模式。
为了保持兼容性,Internet提供了基于区域评估的智能默认值。在默认状态下,公共internet上的所有站点以Internet标准模式显示(兼容性视图关闭),所有intranet网站以Internet 7标准模式显示(兼容性视图)。
将以下内容添加到页面的顶部:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
https://stackoverflow.com/questions/25265885
复制相似问题