2015-04-04 169 views
0

當我「點擊」它時,Bootstrap菜單無法打開。意思是我看不到它中的任何項目。但是當我從鍵盤上按下「向下鍵」時,它立即打開。 這在我運行xaamp服務器時尤其如此。但是當我在沒有任何服務器的情況下直接在瀏覽器中打開的時候,我可以點擊菜單。Bootstrap菜單在導航欄中單擊時不打開

我的代碼的快照如下。 我已經加入下面的CSS和JavaScript的

<meta name="description" content=""> 
     <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 
     <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> 
     <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> 
     <link rel="stylesheet" type="text/css" href="css/isotope.css" media="screen" /> 
     <link rel="stylesheet" href="js/fancybox/jquery.fancybox.css" type="text/css" media="screen" /> 
     <link rel="stylesheet" href="css/bootstrap.css"> 
     <link rel="stylesheet" href="css/bootstrap-theme.css"> 
     <link rel="stylesheet" href="css/style.css"> 


<div class="navbar navbar-fixed-top" role="navigation" data-0="line-height:100px; height:100px; background-color:rgba(0,0,0,0.3);" data-300="line-height:60px; height:60px; background-color:rgba(0,0,0,1);"> 
      <div class="container-fluid"> 
       <div class="navbar-header"> 
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
         <span class="fa fa-bars color-white"></span> 
        </button> 
        <h1><a class="navbar-brand" href="index.php" data-0="line-height:90px;" data-300="line-height:50px;">   CityMart 
        </a></h1> 
       </div> 
       <div class="collapse navbar-collapse collapse"> 
        <ul class="nav nav-pills"> 

         <ul class="nav navbar-nav" data-0="margin-top:20px;" data-300="margin-top:5px;"> 
         <li class="active"><a href="admin_index.php">Home</a></li> 
         <!--<li><a href="#section-about">Abut</a></li> 
         <li><a href="#section-works">Portfolio</a></li>--> 
         <li><a href="#section-works">categories</a></li> 
         <li role="presentation" class="dropdown"> 
          <a class="dropdown-toggle" data-toggle="dropdown" href="admin_index.php" role="button" aria-expanded="true"> 
           Dropdown <strong class="caret"></strong> 
          </a> 
          <ul class="dropdown-menu" role="menu"> 
           <li><a href="admin_category_insert.php">ADD Category</a></li> 
           <li><a href="admin_category_insert.php">ADD Subcategory</a></li> 
           <li><a href="mall_registration.php">Mall Registration</a></li> 
           <li><a href="shop_in_mall.php">ADD Shops In Mall </a></li> 
          </ul> 
         </li> 


          </li> 
        </ul> 

       </ul> 

       </div><!--/.navbar-collapse --> 
      </div> 
     </div> 
+0

嘗試打開瀏覽器控制檯,看是否有關於文件的鏈接和進口任何錯誤。可能有些JS不包含或有錯誤。 – Arqu 2015-04-04 16:15:28

回答

0

嘗試使用引導3.3.4(最新版本)

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js"></script> 
<script src="http://ajax.aspnetcdn.com/ajax/bootstrap/3.3.4/bootstrap.min.js"></script> 
<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/bootstrap/3.3.4/css/bootstrap.min.css"> 
相關問題