如何在Bootstrap 4中创建带有自定义复选框的列表组?

时间:2019-07-18 13:42:49

标签: html css bootstrap-4

我想使用Bootstrap 4创建一个带有标签和自定义复选框的列表组。

2 个答案:

答案 0 :(得分:0)

您的意思是这样的吗?

https://www.bootply.com/mEXshlUkcj

答案 1 :(得分:-1)

<div class="list-group checkbox-list-group">
  <div class="list-group-item">&nbsp;<label><input type="checkbox"><span class="list-group-item-text"><i class="fa fa-fw"></i> Default</span></label></div>
  <div class="list-group-item list-group-item-success"><label>&nbsp;<input type="checkbox"><span class="list-group-item-text"><i class="fa fa-fw"></i> Success</span></label></div>
  <div class="list-group-item list-group-item-info"><label>&nbsp;<input type="checkbox"><span class="list-group-item-text"><i class="fa fa-fw"></i> Info</span></label></div>
  <div class="list-group-item list-group-item-warning"><label>&nbsp;<input type="checkbox"><span class="list-group-item-text"><i class="fa fa-fw"></i> Warning</span></label></div>
  <div class="list-group-item list-group-item-danger"><label>&nbsp;<input type="checkbox"><span class="list-group-item-text"><i class="fa fa-fw"></i> Danger</span></label></div>
</div>