我想在 bootstrap 3 的 3 列中部署我的复选框
例子:
chk1 chk2 chk3
chk4 chk5 chk6
chk7 chk8 chk9
这是我的尝试:
<div class="row">
<div class="col-md-12">
<hr class="hr">
<h3>Izaberi ostale opcije:</h3>
<input type="checkbox" id='Kabinet'> <label for="check1">Kabinet</label>
<input type="checkbox" id='Monitor'> <label for="check1">Monitor</label>
<input type="checkbox" id='Bravice'> <label for="check1">Bravice</label>
<input type="checkbox" id='Pojacalo'> <label for="check1">Pojacalo</label>
<input type="checkbox" id='Coin usta'> <label for="check1">Coin usta</label>
<input type="checkbox" id='Bar kod'> <label for="check1">Bar kod</label>
<input type="checkbox" id='Toper'> <label for="check1">Toper</label>
<input type="checkbox" id='Monitor + Touch'> <label for="check1">Monitor+Touch</label>
<input type="checkbox" id='Brojaci'> <label for="check1">Brojaci</label>
</div>
我尝试将它放入 class="col-md-6"和其他但它不起作用..我考虑为此使用 css 但我不需要 Bootstrap ..它不会响应.你有什么想法吗?我是 Bootstrap 的新手。我需要新行吗?
最佳答案
很简单,如果你想在 3 列中使用 3 个 div,否则如果你想要在你的示例中说明的行中。将下面的类替换为 col-md-12
:-
<div class="row">
<hr class="hr">
<h3>Izaberi ostale opcije:</h3>
<div class="col-md-4">
<input type="checkbox" id='Kabinet'> <label for="check1">Kabinet</label>
<input type="checkbox" id='Monitor'> <label for="check1">Monitor</label>
<input type="checkbox" id='Bravice'> <label for="check1">Bravice</label>
</div>
<div class="col-md-4">
<input type="checkbox" id='Pojacalo'> <label for="check1">Pojacalo</label>
<input type="checkbox" id='Coin usta'> <label for="check1">Coin usta</label>
<input type="checkbox" id='Bar kod'> <label for="check1">Bar kod</label>
</div>
<div class="col-md-4">
<input type="checkbox" id='Toper'> <label for="check1">Toper</label>
<input type="checkbox" id='Monitor + Touch'> <label for="check1">Monitor+Touch</label>
<input type="checkbox" id='Brojaci'> <label for="check1">Brojaci</label>
</div>
关于css - Bootstrap 3 网格 3 列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21133872/