我想在折叠时更改导航栏的背景色,否则使用引导程序4的类将背景色设为无。
<nav class="navbar navbar-light justify-content-end bg-color">
<button class="navbar-toggler" type="button" data-
toggle="collapse" data-target="#thetarget" ><span class="navbar-toggler-
icon"></span>
</button>
<div class="row navbar-collapse collapse" id="thetarget"
style="text-align:center;">
<ul class="col-md-8 navbar-nav nav">
<li class="nav-item"><a href="#home" class="nav-
link">Home</a></li>
<li class="nav-item"><a href="#watchvideos"
class="nav-link">Watch Videos</a></li>
<li class="nav-item"><a href="#MoreTemplates2"
class="nav-link">More Templates 2</a></li>
</ul>
</div>
</nav>