gpt4 book ai didi

html - 使用 Bootstrap 制作类似 Pinterest 的网格 : the boxes are not displayed right below each other

转载 作者:太空狗 更新时间:2023-10-29 13:08:10 25 4
gpt4 key购买 nike

HTML 方案如下:

<div class="items">
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
...
</div>

.item CSS 样式:

float: left;

结果: enter image description here

但是白框并没有一个接一个地对齐——问题可能出在哪里?我也尝试过使用 display: inline-block; 而不是 float: left;,但结果基本相同。

谢谢

最佳答案

您可以像这样使用 CSS 3 column-widthcolumn-gap..

http://www.bootply.com/118335

关于html - 使用 Bootstrap 制作类似 Pinterest 的网格 : the boxes are not displayed right below each other,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22148063/

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