这是在我的网页的顶部代码:IE兼容模式错误
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<title></title>
...
我使用从Paul Irish条件注释代码,使其更容易发现和解决IE的问题,但是这个代码似乎本身就是一个问题。问题是,尽管我根据MSDN guidelines明确声明ie=edge
,但使用条件注释代码强制我的页面进入IE8兼容模式。
卸下条件注释代码周围html
标签修复了故障,并让IE8在标准模式呈现;但我宁愿找到一个解决方案,让我保持有条件的代码,仍然迫使IE浏览器在标准兼容模式下呈现。请记住,我没有使用.htaccess文件,因为这个网站使用的是windows/asp设置。
但似乎他仍然可以尝试将它放在
标记上?不确定这是否受到相同错误的影响。 – 2011-02-25 01:54:03链接无效... – nebulousGirl 2012-07-10 12:14:30
这可能是更新后的链接:https://github.com/h5bp/html5-boilerplate/issues/1187这可能与以下内容有关:https://github.com/h5bp/html5-boilerplate/issues/378 – 2012-10-19 17:26:25