gpt4 book ai didi

html - 如何在 Bulma 中集中对齐列?

转载 作者:太空宇宙 更新时间:2023-11-04 07:15:02 25 4
gpt4 key购买 nike

我正在尝试使用以下布局创建一个基于磁贴的仪表板(无需使用 Bulma 磁贴):

https://jsfiddle.net/foobarbazian/9szfn8db/2/

<div class="container">
<br>
<div class="columns is-multiline">
<div class="column is-3">
<div class="box has-background-success">
<p class="title has-text-centered">One</p>
<div>
<div class="columns ">
<div class="column box is-5">A</div>
<div class="column"></div>
<div class="column box is-5">B</div>
<div class="column"></div>
</div>

<div class="columns">
<div class="column box is-5">C</div>
<div class="column"></div>
<div class="column box is-5">D</div>
<div class="column"></div>
</div>
</div>
</div>
</div>

<div class="column is-3">
<div class="box has-background-danger">
<p class="title has-text-centered">Two</p>
<div>
<div class="columns ">
<div class="column box is-5">A</div>
<div class="column"></div>
<div class="column box is-5">B</div>
<div class="column"></div>
</div>

<div class="columns">
<div class="column box is-5">C</div>
<div class="column"></div>
<div class="column box is-5">D</div>
<div class="column"></div>
</div>
</div>
</div>
</div>

<div class="column is-3">
<div class="box has-background-success">
<p class="title has-text-centered">Three</p>
<div>
<div class="columns ">
<div class="column box is-5">A</div>
<div class="column"></div>
<div class="column box is-5">B</div>
<div class="column"></div>
</div>

<div class="columns">
<div class="column box is-5">C</div>
<div class="column"></div>
<div class="column box is-5">D</div>
<div class="column"></div>
</div>
</div>
</div>
</div>
</div>
</div>

但是我可以看到左边有一个缝隙,比盒子右边的缝隙小,每个盒子的底部也有一个缝隙。

如何确保内容很好地放置在每个框的中间?

最佳答案

 
.columns {
flex-wrap: wrap;
justify-content: space-between
}
.column.is-5 {
height: 100%;
}
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<div class="container">
<br>
<div class="columns is-multiline">
<div class="column is-3">
<div class="box has-background-success">
<p class="title has-text-centered">One</p>
<div>
<div class="columns ">
<div class="column box is-5">A</div>

<div class="column box is-5">B</div>

<div class="column box is-5">C</div>

<div class="column box is-5">D</div>

</div>
</div>
</div>


</div>

关于html - 如何在 Bulma 中集中对齐列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50796753/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com