首页 > 代码库 > bootsrtap开发下拉菜单的2级嵌套

bootsrtap开发下拉菜单的2级嵌套

<html lang="en">
<head>
    <title>按钮</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />  
    <script src=http://www.mamicode.com/"../file/jquery.js" type="text/javascript"></script>
    <link href=http://www.mamicode.com/"../book/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <script src=http://www.mamicode.com/"../book/js/bootstrap.js" type="text/javascript"></script>
</head>
<body>
  <div class="btn-group">
     <button type="button" class="btn btn-default">首页</button>
     <div class="btn-group">
       <button data-toggle="dropdown" class="btn btn-default dropdown-toggle" type="button">
          个人信息<span class="caret"></span>
       </button>
       <ul class="dropdown-menu">
          <li><a href=http://www.mamicode.com/"#">个人信息
          <li><a href=http://www.mamicode.com/"#">最新活动
          <li><a href=http://www.mamicode.com/"#">推荐好友
          <li><a href=http://www.mamicode.com/"#">注销
       </ul>
     </div>
     <div class="btn-group">
       <button data-toggle="dropdown" class="btn btn-default dropdown-toggle" type="button">
          关于我们<span class="caret"></span>
       </button>
       <ul class="dropdown-menu">
          <li><a href=http://www.mamicode.com/"#">公司介绍
          <li><a href=http://www.mamicode.com/"#">联系我们
       </ul>
     </div>
  </div>
</body>
</html>

 

效果:

 


bootsrtap开发下拉菜单的2级嵌套