我是Bootstrap和Symfony的新手。我試圖摺疊這個導航欄,但沒有工作。希望您能夠幫助我。Navbar崩潰不起作用 - Bootstrap
下面的代碼:
頭
<head>
<title> Title </title>
<meta name="Description" content="HINT"/>
<meta name="Distribution" content="global"/>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="content">
<link rel="icon" href="{{asset('favicon.ico')}}">
<link href="{{asset('css/base-style.css')}}" rel="stylesheet">
<link href="{{asset('css/slider.css')}}" rel="stylesheet">
<script type="text/javascript" src="{{asset('js/jssor.js')}}"></script>
<script type="text/javascript" src="{{asset('js/jssor.slider.js')}}"></script>
<script type="text/javascript" src="{{asset('js/dropdown.js')}}"></script>
和按鈕顯示在導航欄部分
<div id="header" class="container-fluid">
<!--
<div class = "logo">
<img src="{{asset('images/Logo.png')}}"></img>
</div>
-->
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<ul>
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" style="padding:0px;" href="#">
<img class="img-responsive" alt="Brand" src="{{asset('images/Logo.png')}}"/>
</a>
</div>
<li class="active"><a href="{{ path('nucleo_homepage')}}">Home</a></li>
<li><a href="{{ path('nucleo_empresa')}}">Business</a></li>
<li class="drop"> <a href="#">Servicios</a>
<div class="dropdownContain">
<div class="dropOut">
<div class="triangle"></div>
<div class="triangle-border"></div>
<ul>
<li onclick="urlservicios('1');">Head Hunting </li>
<li onclick="urlservicios('2');">Study</li>
<li onclick="urlservicios('3');">Profiles</li>
<li onclick="urlservicios('4');">Consultorías</li>
<li onclick="urlservicios('5');">Functions</li>
<li onclick="urlservicios('6');">Interviews</a></li>
<li onclick="urlservicios('7');">Matrix</a></li>
</ul>
</div>
</div >
</li>
<li class="drop"> <a href="{{ path('nucleo_cv')}}"> TEXT </a>
<div class="dropdownContain">
<div class="dropOut">
</div>
</div>
</li>
<li class="drop"> <a href="{{ path('nucleo_contactos')}}">Contact us</a>
<div class="dropdownContain">
<div class="dropOut">
<ul>
</div>
</div>
</ul>
</li>
</ul>
</div>
</nav>
</div>
,但它不會崩潰。
感謝您的建議。我嘗試過,但Navbar只是保持摺疊狀態。 –