码迷,mamicode.com
首页 > 其他好文 > 详细

Bootstrap系列 -- 30. 按钮工具栏

时间:2015-06-26 23:35:35      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:

 

  在富文本编辑器中,将按钮组分组排列在一起,比如说复制、剪切和粘贴一组;左对齐、中间对齐、右对齐和两端对齐一组.Bootstrap框架按钮工具栏也提供了这样的制作方法,你只需要将按钮组“btn-group”按组放在一个大的容器“btn-toolbar”中.

  如果按钮组中需要改变大小,可以使用 .btn-group-lg:大按钮组 ,.btn-group-sm:小按钮组, .btn-group-xs:超小按钮组

<div class="btn-toolbar">
  <div class="btn-group">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-left"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-center"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-right"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-justify"></span></button>
  </div>
  <div class="btn-group">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-indent-left"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-indent-right"></span></button>
  </div>
  <div class="btn-group">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-font"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-bold"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-italic"></span></button>
  </div>
  <div class="btn-group">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-text-height"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-text-width"></span></button>
  </div>
</div>
<br />
<br />
<div class="btn-toolbar">
  <div class="btn-group btn-group-lg">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-left"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-center"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-right"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-align-justify"></span></button>
  </div>
  <div class="btn-group">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-indent-left"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-indent-right"></span></button>
  </div>
  <div class="btn-group btn-group-sm">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-font"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-bold"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-italic"></span></button>
  </div>
  <div class="btn-group btn-group-xs">
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-text-height"></span></button>
    <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-text-width"></span></button>
  </div>
</div>


<div class="btn-toolbar">
        <div class="btn-group btn-group-lg">
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-step-backward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-fast-backward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-fast-forward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-step-forward"></span>
            </button>
        </div>

        <div class="btn-group">
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-step-backward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-fast-backward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-fast-forward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-step-forward"></span>
            </button>
        </div>

        <div class="btn-group btn-group-sm">
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-step-backward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-fast-backward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-fast-forward"></span>
            </button>
            <button class="btn btn-info">
                <span class="glyphicon glyphicon-step-forward"></span>
            </button>
        </div>
</div>

 

Bootstrap系列 -- 30. 按钮工具栏

标签:

原文地址:http://www.cnblogs.com/qingyuan/p/4603380.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!