Bootstrap如何激活导航状态
boonyaxnn 人气:0本文实例为大家分享了Bootstrap激活导航状态的具体代码,供大家参考,具体内容如下
<!DOCTYPE html> <html> <head> <title>Bootstrap-激活导航状态</title> <meta charset="utf-8"> <link rel="stylesheet" href="css/bootstrap.min.css"> <style> body { padding-top: 150px; padding-bottom: 40px; font-family: '楷体'; font-size: 24px; } span.badge { font-size: 18px; } </style> </head> <body> <div class="container"> <h3>胶囊式导航中的激活状态</h3> <ul class="nav nav-pills"> <li class="active"> <a href="#">首页 <span class="badge">42</span></a> </li> <li> <a href="#">简介</a> </li> <li> <a href="#">消息 <span class="badge" >3</span></a> </li> </ul> <br> <h3>列表导航中的激活状态</h3> <ul class="nav nav-pills nav-stacked" style="max-width: 260px;"> <li class="active"> <a href="#"> <span class="badge pull-right">42</span> 首页 </a> </li> <li> <a href="#">简介</a> </li> <li> <a href="#"> <span class="badge pull-right">3</span> 消息 </a> </li> </ul> </div> <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> </body> </html>
效果图:
加载全部内容