gpt4 book ai didi

CSS/Bootstrap3 - 为什么列类具有 'min-height' 值?

转载 作者:太空宇宙 更新时间:2023-11-03 22:42:52 25 4
gpt4 key购买 nike

有人知道 Boostrap col-**-* 类具有最小高度值声明的目的吗?为什么只有一个像素?

Boostrap 列类 CSS:

position: relative;
min-height: 1px; <--- ??
padding-right: 15px;
padding-left: 15px;

最佳答案

根据 Bootstrap 的 documentation在网格系统上:

 // Prevent columns from collapsing when empty
min-height: 1px;

如果列不包含任何内容,它们将水平折叠。因此,添加 1pxmin-height 允许您创建仍然呈现并影响页面布局的空列,而无需在其中放置任何内容。 1px 只是可能的最小尺寸。

关于CSS/Bootstrap3 - 为什么列类具有 'min-height' 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43295023/

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