【发布时间】:2021-10-05 05:59:50
【问题描述】:
我正在使用 bootstrap 5,我在一行中创建了 6 列,其中我在行中使用了装订线,但装订线没有应用在它上面,我无法看到列之间的空间。谁能指导我这里做错了什么?以下是我的代码
.box{
height: 100px;
background-color: blue;
box-sizing: border-box;
}
.myrow{
background-color: red;
}
<div class="container">
<div class="row myrow gx-5">
<div class="box col-lg-2">1</div>
<div class="box col-lg-2">2</div>
<div class="box col-lg-2">3</div>
<div class="box col-lg-2">4</div>
<div class="box col-lg-2">5</div>
<div class="box col-lg-2">6</div>
</div>
</div>
【问题讨论】:
-
你到底想达到什么目标?我的意思是,每一行都用足够的空格正确分隔。 Here 是您示例的链接。
-
@NagySzabolcs 实际上是在尝试将图像放入列中,然后在所有列之间留出空间,以便我的图像看起来分开
标签: html css bootstrap-5