首先道歉打开了一个应该被视为一个相当简单的问题的问题......它应该是,但我不能让它努力挽救我的生命。
也许有人可以快速扫描这段代码并告诉我我做错了什么,因为我不熟悉bootstap(我在这里使用)和HTML5
我的问题
Navbar在主页上完美运行,但在将导航栏复制并粘贴到其他页面时,services
和menu
链接根本不会展开/折叠
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Finger Food Catering</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Menu<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="hot-food-platters.html">Hot Platters</a></li>
<li><a href="cold-finger-food-platters.html">Cold Platters</a></li>
<li><a href="gourmet-finger-food-platters.html">Gourmet Platters</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Services<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="wedding-catering.html">Wedding Catering</a></li>
<li><a href="birthday-catering.html">Birthday Catering</a></li>
<li><a href="corporate-catering.html">Corporate Catering</a></li>
<li><a href="special-event-catering.html">Event Catering</a></li>
<li><a href="funeral-catering.html">Funeral Cateringg</a></li>
</ul>
</li>
<li><a href="about.html">About</a></li>
<li><a href="testimonials.html">Testimonials</a></li>
<li><a href="inquire.html">Inquire</a></li>
<li><a href="blog.html">Blog</a></li>
<li class="active"><a href="contact.html">Contact</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span style="font-size:2.0em"><span style="color:#8AB8E6">Contact Us:</span> <body onload="_googWcmGet('number', '1300 785 701')">
<span class="number">1300 785 701</span>
</body> </a></li>
</ul>
</div>
</div>
</nav>
答案 0 :(得分:0)
您使用的是Materialize吗?
如果是,请向下滚动到脚本所在的index.php的底部,然后将<script src="../../bin/materialize.js"></script>
更改为<script src="js/materialize.js"></script>