我正在使用 Visual Studio 2012
我有这个简单的 html 页面,不是 ASP.NET 页面:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Float</title>
<link rel="stylesheet" href="Styles/style.css" />
</head>
<body>
<div class="header"></div>
<div class="slideBar"></div>
<div class="content"></div>
<div class="footer"></div>
</body>
</html>
我在谷歌浏览器上运行它。效果很好。
当我在 Internet Explorer 上调试它时。我收到这个错误:
![enter image description here](https://i.stack.imgur.com/or65M.png)
Edit
对于那些认为样式表是问题的人。这是我的样式表
html, body {
margin:0px;
height:100%;
}
.header {
width:100%;
height:20%;
background-color:red;
}
.footer {
width:100%;
height:20%;
background-color:green;
}
.slideBar {
width:20%;
height:60%;
float:right;
background-color:blue;
}
.content {
width:80%;
height:60%;
background-color:yellow;
}
它在 google chrome 和 mozilla 上运行得很好。代码非常非常简单。只是IE11不是
Edit2
在我将 html 页面链接添加到兼容模式后。我得到了这个例外:
![enter image description here](https://i.stack.imgur.com/RpKFV.png)
您的浏览器显然正在运行一个加载项,该加载项会将脚本注入到加载的页面中,这些脚本会导致 IE11(和 10)出现问题。
您可以通过添加以下命令将 Visual Studio 配置为在安全模式下运行 IE:iexplore -extoff
进入浏览方式列表并将其设置为默认值,如所解释的here.
也就是说,我建议调查哪个加载项造成了这种情况,因为它可能会对您的网络使用(以及您的隐私)产生其他不利影响,并且您可能希望尽可能将其删除。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)