Bootstrap 历练实例 - 按钮(Button)插件复选框

复选框(Checkbox)

您可以创建复选框按钮 组,并通过向 btn-group 添加 data 属性 data-toggle="buttons" 来添加复选框按钮组的切换。

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Bootstrap 历练实例 - 按钮(Button)插件复选框</title>
<meta charset="utf-8" />
<meta name="viewport"content="width=device-width,initial-scale=1.0" />
<script src="jQuery/jquery-2.1.4.js"></script>
<link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap.min.css" />
<script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>

</head>
<body>
<div class="container"style="padding:20px">
<div class="btn-group"data-toggle="buttons">
<label class="btn btn-success"><input type="checkbox" />选项1</label>
<label class="btn btn-primary"><input type="checkbox" />选项2</label>
<label class="btn btn-info"><input type="checkbox" />选项3</label>
</div>
</div>
</body>
</html>

posted @ 2015-11-30 15:53  melao2006  阅读(275)  评论(0编辑  收藏  举报