Bootstrap学习------按钮

      Bootstrap为我们提供了按钮组的样式,博主写了几个简单的例子,以后也许用的到。

效果如下 

代码如下

 

<!DOCTYPE html>
<html>
<head>
    <title>
    </title>
    <script src="~/Scripts/jquery-2.1.4.min.js"></script>
    <link href="~/Content/bootstrap/NewFolder1/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Scripts/bootstrap.min.js"></script>
</head>
<body>
    <div class="container">

        <div class="form-group">
            <span>普通横向按钮组</span>
            <div class="btn-group">
                <button type="button" class="btn btn-default">A</button>
                <button type="button" class="btn btn-default">B</button>
                <button type="button" class="btn btn-default">C</button>
            </div>
        </div>

        <div class="form-group">
            <span>普通竖直按钮组</span>
            <div class="btn-group-vertical">
                <button type="button" class="btn btn-default">A</button>
                <button type="button" class="btn btn-default">B</button>
                <button type="button" class="btn btn-default">C</button>
            </div>
        </div>

        <div class="form-group">
            <span>普通横向按钮组</span>
            <div class="btn-group btn-group-justified">
                <div class="btn-group">
                    <button type="button" class="btn btn-default">A</button>
                </div>
                <div class="btn-group">
                    <button type="button" class="btn btn-default">B</button>
                </div>
                <div class="btn-group">
                    <button type="button" class="btn btn-default">C</button>
                </div>
            </div>
        </div>

        <div class="form-group">
            <span>带有下拉列表按钮组</span>
            <div class="btn-group">             
                <div class="btn-group">
                    <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
                        下拉菜单                       
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="#">C</a></li>
                        <li><a href="#">D</a></li>
                        <li><a href="#">E</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="form-group">
            <span>带有下拉列表按钮组</span>
            <div class="btn-group">
                <button type="button" class="btn btn-info btn-sm">
                    分裂式下拉列表
                </button>
                <button type="button" class="btn btn-info dropdown-toggle btn-sm" data-toggle="dropdown">

                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu">
                    <li><a href="物流订单导出模板?id=1">导出.xls格式</a></li>
                    <li><a href="物流订单导出模板?id=2">导出.xlsx格式</a></li>
                    <li><a href="物流订单导出模板?id=3">导出.csv格式</a></li>
                </ul>
                </div>
            </div>

        </div>
</body>
</html>

 

posted on 2015-11-25 15:26  花生哒哒  阅读(303)  评论(0编辑  收藏  举报

导航