我正在为我的网站制作一个导航栏,但是它似乎不起作用。当我单击下拉菜单中的产品选项卡时,它就像一个无效链接一样工作,并带我到index.php#。请帮忙。我为它附加标记:
<nav class="navbar navbar-default" >
<div class="container-fluid">
<ul class="nav navbar-nav">
<li class="active"><a href="index.php" >HOME</a></li>
<li><a href="#">CONTACT US</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">PRODUCTS <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="boys.php">BOYS</a></li>
<li><a href="girls.php">GIRLS</a></li>
</ul>
</li>
</ul>
</div>
</nav>
您是否包含引导程序的链接
and add jquery and script at bottom wid jquery above javascript
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句