bootstrap.offcanvas.js是一款流行的滑动导航菜单插件,只要定义好html,即可生成菜单栏按钮和隐藏的右侧菜单弹出层。
0、请不要问“在不在”之类的问题,有问题直接问!1、学生或暂时没有工作的童鞋,整站资源免费下载!2、¥9.9充值终身VIP会员,加我微信,826096331 拉你进VIP群学习!3、程序员加油,技术改变世界。在线 充值
点击按钮
<button type="button" class="navbar-toggle offcanvas-toggle" data-toggle="offcanvas" data-target="#js-bootstrap-offcanvas">
</button>
隐藏的弹出层菜单结构
<nav class="navbar navbar-default navbar-offcanvas navbar-offcanvas-right navbar-offcanvas-touch navbar-offcanvas-fade" role="navigation" id="js-bootstrap-offcanvas-2">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Brand 2</a>
</div>
<div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle">Another Link <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li><a href="#">Another Link</a></li>
</ul>
</div>
</div>
</nav>
引入bootstrap.offcanvas.js侧边栏隐藏菜单插件
<link rel="stylesheet" href="css/bootstrap.offcanvas.min.css"/>
<script src="js/bootstrap.offcanvas.js"></script>
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群