W002缺少X-UA兼容的<meta />标记,禁用旧的IE兼容模式

时间:2017-08-27 19:59:31

标签: javascript twitter-bootstrap

自举

这是我的简单代码:

&#13;
&#13;
<!DOCTYPE html>
<html>
<head>
	<meta charset='UTF-8'/>
	<meta http-equiv='X-UA-Compatible' content='IE=Edge'/>
	<meta name='viewport' content='width=device-width, initial-scale=1'/>
	<title>Hello</title>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>
	<div class='container-fluid'>
		<div class='jumbotron'>
			<h1>Hello, world!</h1>
			<p>This is our first sample example that will be more awesome in the next chapters!</p>
			<a class='btn btn-primary btn-lg' href='#' role='button'>
				Bootstrap by Example, Chapter 1
			</a>
		</div>
	</div>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
&#13;
&#13;
&#13;

我通过Bootlint检查并收到错误:

  

W002 <head>缺少兼容X-UA的<meta>标记,禁用旧的IE兼容模式

嗯...但我的代码有X-UA兼容<meta>标记。为什么Bootlint会告诉我这个?

1 个答案:

答案 0 :(得分:0)

正确的标记在e

中使用小写edge

https://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx

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

然后它没有问题地通过Bootlint。

相关问题