如何在Bootstrap 4模式中的DIV之间留出空间?

问题描述 投票:0回答:2

如何在bootstrap 4模式中的DIV之间留出空间?

enter image description here

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>
html bootstrap-4 bootstrap-modal
2个回答
0
投票

在第二个div类中,即col-lg,它可以根据您的要求将保证金维持在3到3或2到6之间,并尝试有关更多指导,请遵循此https://getbootstrap.com/docs/4.4/utilities/spacing/


0
投票

只需创建一个div并将所有classes name放入该div中。不要在col-中使用所有内容。

© www.soinside.com 2019 - 2024. All rights reserved.