bootstrap 在 IE8 中工作的结构应该是什么?

What should be in the structure for bootstrap to work in IE8?

我正在尝试创建一个支持 IE8 的 bootstrap 站点。但它非常失败。 这个结构对吗?我在 Whosebug 上读到过,一切都应该是本地的。

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<title></title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="js/respond.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>

<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
</body>

你试过 Wouter van der Graaf JavaScript 库 css3-mediaqueries.js https://code.google.com/p/css3-mediaqueries-js/

在head标签中添加如下代码给你html

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lte IE 9]>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
  <![endif]-->



 <!--[if lte IE 8]
  <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
  <script>
    document.createElement('ng-controller');
         document.createElement('ng-app');
    // Other custom elements
  </script>
  <![endif]-->

这些行document.createElement('ng-controller');只有当你使用 angularjs.