Bootstrap页面布局14 - BS按钮群组

首先看看这个代码:

<div class='btn-group'>
   <button type='button' class='btn'>计算机</button>
   <button type='button' class='btn'>网络</button>
   <button type='button' class='btn'>桌面项目</button>
</div>

将功能相近的按钮分成一组,bootstrap 为我们设定了该组的样式

如图:

还可以进行更加复杂的分组

<div class='btn-toolbar'>
    <div class='btn-group'>
       <button type='button' class='btn'>计算机</button>
       <button type='button' class='btn'>网络</button>
       <button type='button' class='btn'>桌面项目</button>
    </div>
    <div class='btn-group'>
       <button type='button' class='btn'>按钮一</button>
       <button type='button' class='btn'>按钮二</button>
       <button type='button' class='btn'>按钮三</button>
    </div>
</div>

如图:

使用这种方法可以为网站创建复杂的工具栏

posted @ 2014-08-03 00:14  Zell~Dincht  阅读(291)  评论(0编辑  收藏  举报