如何在bootstrap 4模式中的DIV之间留出空间?
HTML
<div class="form-group clearfix row">
<div class="col-lg-3 pd-30 card bg-info border-radius-5 box-shadow text-center justify-content-center align-self-center">
<h1 class="text-white">1</h1>
</div>
<div class="col-lg-3 pd-30 card bg-info border-radius-5 box-shadow text-center justify-content-center align-self-center">
<h1 class="text-white">2</h1>
</div>
<div class="col-lg-3 pd-30 card bg-info border-radius-5 box-shadow text-center justify-content-center align-self-center">
<h1 class="text-white">3</h1>
</div>
<div class="col-lg-3 pd-30 card bg-info border-radius-5 box-shadow text-center justify-content-center align-self-center">
<h1 class="text-white">4</h1>
</div>
</div>
在第二个div类中,即col-lg,它可以根据您的要求将保证金维持在3到3或2到6之间,并尝试有关更多指导,请遵循此https://getbootstrap.com/docs/4.4/utilities/spacing/
只需创建一个div
并将所有classes name
放入该div中。不要在col-
中使用所有内容。