html - 如何使用引导程序分隔两个复选框?
问题描述
我正在尝试制作一个引导表单页面,但我在前端很糟糕。
我的问题很简单:我怎样才能间隔这些复选框?
<div class="form-group">
<label for="">Repetir?</label>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="segunda">
<label class="form-check-label">Segunda</label>
<input type="checkbox" class="form-check-input" id="segunda">
<label class="form-check-label">Terça</label>
<input type="checkbox" class="form-check-input" id="segunda">
<label class="form-check-label">Quarta</label>
<input type="checkbox" class="form-check-input" id="segunda">
<label class="form-check-label">Quinta</label>
<input type="checkbox" class="form-check-input" id="segunda">
<label class="form-check-label">Sexta</label>
<input type="checkbox" class="form-check-input" id="segunda">
<label class="form-check-label">Sábado</label>
<input type="checkbox" class="form-check-input" id="segunda">
<label class="form-check-label">Domingo</label>
</div>
</div>
他们非常接近。谢谢你
解决方案
您可以使用 bootstrap-4 或 alpha 的 margin left ( ml-x
)、margin right ( mr-x
) 或 padding left ( pl-x
)、padding right ( pr-x
) 类。哪里x
是任何数字(1、2、3 等)。
例如 pl-1 或 pr-2
使用 bootstrap-3,您可以编写自己的简单类:
.ml-1 {
margin-left: 4px !important;
}