简单教程
提交运行
代码编辑器:
<!DOCTYPE htm> <meta charset="utf-8"> <link href="https://cdn.bootcss.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet"> <style>body {margin:10px}</style> <div class="container"> <div class="row"> <div class="span5"> <ul class="nav nav-pills"> <li class="active"><a href="#">简单教程</a></li> <li><a href="#">Python2</a></li> <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">前端<b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Bootstrap</a></li> <li><a href="#">Google Plus API</a></li> <li><a href="#">HTML5</a></li> <li class="divider"></li> <li><a href="#">Examples</a></li> </ul> </li> </ul> </div> </div> </div> <script src="/static/lib/bootstrap/2.3.2/docs/assets/js/jquery.js"></script> <script src="/static/lib/bootstrap/2.3.2/docs/assets/js/bootstrap.min.js"></script> <script>$(document).ready(function () {$('.dropdown-toggle').dropdown();});</script>
运行结果: