<div class="navbar-header" style="margin-top: 5px;">
<!-- data-target后面接的值是需要隐藏的id,aria-controls是控制被隐藏的元素的 -->
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#MenuCollaspe" aria-controls="MenuCollaspe" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<img alt="Brand" src="image/Icon_primaryl.png" />
</div>
<nav class="navbar-collapse collapse in" aria-expanded="true" id="MenuCollaspe">
<ul class="nav navbar-nav">
<li>
<a href=
Bootstrap隐藏式导航条的实现
最新推荐文章于 2023-01-16 09:26:53 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)