Internet Explorer 9. Bootstrap菜单未折叠

时间:2013-12-14 14:08:02

标签: html css internet-explorer twitter-bootstrap

当我开始在其他浏览器上测试时,我几乎已经完成了使用twitter bootstrap框架构建网站。它在所有浏览器上的外观和感觉都很棒(如果我可以自己这么说......)但是,在IE9和IE8等等都无法折叠菜单栏以显示子类别。可能是什么原因,我该怎么做才能解决它?这可能是由JavaScript引起的吗?

提前感谢您的帮助!

请注意我在堆栈溢出中查看了类似的问题,但它们大多没有定论。

<!-- Required Parralax JavaScript -->
< script type = "text/javascript"
src = "http://code.jquery.com/jquery-2.0.3.min.js" > < /script>
<script type="text/javascript" src="js / jquery.stellar.min.js "></script>
<script type="text / javascript " src="js / waypoints.js "></script>
<script type="text / javascript " src="js / jquery.easing.1.3.js "></script>
<script type="text / javascript " src="js / main.js "></script>
<script src="js / bootstrap.js "></script> 
<!-- Required Styles for theme -->
<link rel="stylesheet " href="http: //netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
< link rel = "stylesheet"type = "text/css"href = "css/bootstrap.css" > 
< link rel = "stylesheet"type = "text/css"href = "css/style.css" >
< /head>
<body>
   <header>
      <div class="navbar navbar-default navbar-fixed-top">
         <div class="container">
            <div class="navbar-header">
               <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="navbar-collapse">
               <span class="icon-bar"></span > < span class = "icon-bar" > < /span>
               <span class="icon-bar"></span > < /button>
               <a href="index.html" class="navbar-brand"><img src="img/logo.png "></a>
            </div>
            <!-- Category: Header-->
            <div class="
               navbar - collapse collapse ">
               <ul class="
                  menu nav navbar - nav pull - right ">
               <li class="
                  dropdown ">
                  <a href="#
                     " class="
                     dropdown - toggle hover1 " data-toggle="
                     dropdown ">Category<b class="
                     caret "></b></a>
                  <ul class="
                     dropdown - menu ">
                     <li><a href="#
                        ">Sub1</a></li>
                     <li><a href="#
                        ">Sub 2</a></li>
                     <li><a href="#
                        ">Sub 3</a></li>
                  </ul>
               </li>
               <!-- Category: Header -->
               <li class="
                  dropdown ">
                  <a href="#
                     " class="
                     dropdown - toggle hover1 " data-toggle="
                     dropdown ">Category<b class="
                     caret "></b></a>
                  <ul class="
                     dropdown - menu ">
                     <li><a href="#
                        ">Sub Cat</a></li>
                     <li><a href="#
                        ">Sub Cat</a></li>
                  </ul>
               </li>
            </div>
         </div>
      </div>
   </header>

1 个答案:

答案 0 :(得分:0)

这实际上是IE 9的默认安全设置。如果您将它们更改为始终允许ActiveX和JavaScript,则应该根除此问题。完全偶然发现了这一点。

希望这能帮助其他人解决同样的问题