标签:
您可以创建复选框按钮 组,并通过向 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>
Bootstrap 历练实例 - 按钮(Button)插件复选框
标签:
原文地址:http://www.cnblogs.com/melao2006/p/5007431.html