1
引导W002 <head>缺少X-UA兼容<meta>标签禁用旧IE兼容模式
这是我简单的代码:
<!DOCTYPE html>
<html>
<head>
\t <meta charset='UTF-8'/>
\t <meta http-equiv='X-UA-Compatible' content='IE=Edge'/>
\t <meta name='viewport' content='width=device-width, initial-scale=1'/>
\t <title>Hello</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>
\t <div class='container-fluid'>
\t \t <div class='jumbotron'>
\t \t \t <h1>Hello, world!</h1>
\t \t \t <p>This is our first sample example that will be more awesome in the next chapters!</p>
\t \t \t <a class='btn btn-primary btn-lg' href='#' role='button'>
\t \t \t \t Bootstrap by Example, Chapter 1
\t \t \t </a>
\t \t </div>
\t </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>
我通过Bootlint检查和得到错误:
W002
<head>
is missing X-UA-Compatible<meta>
tag that disables old IE compatibility modes
嗯......但我的代码有X-UA兼容<meta>
标签。为什么Bootlint会告诉我这件事?
值得注意的是,该检查将在下一个Bootstrap和相应的Bootlint版本中删除。 – phk