Bootstrap学习笔记(六) 按钮组
通过按钮组容器把一组按钮放在同一行里。通过与按钮插件联合使用,可以设置为单选框或多选框的样式和行为
<div class="btn-group">
<button type="button" class="btn btn-default">Left</button>
<button type="button" class="btn btn-success">Middle</button>
<button type="button" class="btn btn-warning">Right</button>
</div>
按钮组嵌套下拉框
<div class="btn-group">
<button class="btn btn-danger">按钮1</button>
<button class="btn btn-success">按钮2</button>
<button class="btn btn-warning">按钮3</button>
<div class="btn-group">
<button class="btn btn-primary" data-toggle="dropdown">我是一个下拉框
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">python</a></li>
<li><a href="#">c++</a></li>
<li><a href="#">java</a></li>
</ul>
</div>
</div>
分裂式下拉菜单
<div class="btn-group">
<button class="btn btn-success">成功</button>
<button class="btn btn-info" data-toggle="dropdown">
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">python</a></li>
<li><a href="#">c++</a></li>
<li><a href="#">java</a></li>
</ul>
</div>