摺疊 | Collapsephp
左側導航菜單 用panel-collapsecss
參考:html
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-2"> <ul id="main-nav" class="main-nav nav nav-tabs nav-stacked" style=""> <li> <a href="#systemSetting" class="nav-header collapsed" data-toggle="collapse"> <i class="glyphicon glyphicon-cog"></i> 系統管理 <span class="pull-right glyphicon glyphicon-chevron-toggle"></span> </a> <ul id="systemSetting" class="nav nav-list secondmenu collapse" style="height: 0px;"> <li><a href="#"><i class="glyphicon glyphicon-user"></i> 用戶管理</a></li> <li><a href="#"><i class="glyphicon glyphicon-th-list"></i> 菜單管理</a></li> <li><a href="#"><i class="glyphicon glyphicon-asterisk"></i> 角色管理</a></li> <li><a href="#"><i class="glyphicon glyphicon-edit"></i> 修改密碼</a></li> <li><a href="#"><i class="glyphicon glyphicon-eye-open"></i> 日誌查看</a></li> </ul> </li> </ul> </div> </div> </div> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> </body> </html>
在線運行:
http://www.runoob.com/try/try.php?filename=bootstrap3-plugin-dropdown-methodjquery
其餘參考:bootstrap
https://www.jb51.net/article/106487.htm https://www.jb51.net/article/82980.htm http://www.runoob.com/bootstrap/bootstrap-collapse-plugin.html