bootstrap hidden-lg类在ie9中不起作用

时间:2015-04-23 10:56:29

标签: css twitter-bootstrap internet-explorer-9

Bootstrap hidden-lg类在IE 9中不起作用

hidden-lg不仅仅隐藏IE 9中的指定元素。

任何人都知道这个问题吗?

1 个答案:

答案 0 :(得分:0)

在IE 9中使用bootstrap你必须添加respond.js和html5shiva.js,其他明智的媒体查询将无法正常工作。你可能会遗漏这些东西,请更正你的页面并检查

 <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->

<强> HTML                                            

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

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

bootstrap清楚地解释了这个click to read

同时阅读this链接

希望这很好用