我正在熟悉 MDbootstrap 和 bootstrap 4。我最近使用切换按钮创建了一个网站,但是没有问题,但是,对于我正在创建的这个网站,一旦单击,切换按钮就不会关闭。我似乎无法弄清楚。我觉得这是一个 MDbootstrap 错误,因为我看到其他人对此发表评论但没有答案。当我更多地了解 MDBootstrap 时,我遇到了很多错误。谁能帮我?
HTML
<!--Navbar /Logo-->
<nav class="navbar navbar-expand-sm navbar-dark" style="background-color:#7e57c2;">
<a class="navbar-brand" href="index.html" style="color:#FFF;">Ride with Amy</a>
<!--Toggle Button-->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon" style="color:#FFF;"></span></button>
<!--Navbar links-->
<div class="collapse navbar-collapse text-center" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link"
href="#about_link" style="color:#FFF;">About</a>
</li>
<li class="nav-item">
<a class="nav-link"
href="#schedule_link" style="color:#FFF;">Schedule</a>
</li>
<!--Social Media Icons-->
<li class="nav-item">
<a class="nav-link" href="https://www.instagram.com/ridewithamy/" title="Follow on Instagram" target="_blank"><i class="fa fa-instagram fa-lg" aria-hidden="true" style="color:#FFF;"></i></a></li>
<li class="nav-item">
<a class="nav-link" href="https://www.facebook.com/amy.kaczmarek.3" title="Follow on Linkedin" target="_blank"><i class="fa fa-facebook fa-lg" aria-hidden="true" style="color:#FFF;"></i></a></li>
</ul>
</div>
</nav>