Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<nav class="navbar navbar-light navbar-expand-md navigation-clean-button">
<div data-toggle="collapse" data-target=".navbar-collapse.show" class="container"><router-link class="navbar-brand" to="/">首页</router-link><button class="navbar-toggler" data-toggle="collapse" data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse"
id="navcol-1">
<ul class="nav navbar-nav mr-auto">
<li class="nav-item" role="presentation"><router-link class="nav-link" to="/see-other-forum-list">查贴吧</router-link></li>
<li class="nav-item" role="presentation"><a class="nav-link" href="#">Second Item</a></li>
<li class="dropdown"><a class="dropdown-toggle nav-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="#">Dropdown</a>
<div class="dropdown-menu" role="menu"><a class="dropdown-item" role="presentation" href="#">First Item</a><a class="dropdown-item" role="presentation" href="#">Second Item</a><a class="dropdown-item" role="presentation" href="#">Third Item</a></div>
</li>
</ul><span class="navbar-text actions"><a href="#" class="login">登录</a><a class="btn btn-light action-button" role="button" href="#">注册</a></span></div>
</div>
</nav>
重点是:data-toggle="collapse" data-target=".navbar-collapse.show"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.