gpt4 book ai didi

css - 是否有全 View 高度的 Bootstrap 类

转载 作者:太空宇宙 更新时间:2023-11-04 05:51:05 24 4
gpt4 key购买 nike

我已经实现了以下 CSS 类:

.full-view-height {
min-height: 100vh;
}

因为经过无数次网络搜索,我无法找到等效的 Bootstrap 类。 bootstrap 4 中默认存在这样的类吗?

最佳答案

简答:

是:

.min-vh-100

长答案:

我在写这个问题时突然想到我可以在 dist/css/bootstrap.css 上进行全文搜索以获得 100vh。大多数结果都与模态有关,但我最终找到了以下代码:

.min-vh-100 {
min-height: 100vh !important;
}

它按预期工作。随后,我使用更精确的查询对 scss 文件夹进行了 grep,以发现源是 scss/utilities/_sizing.scss 中的一行,其中包括一些其他类似的帮助程序类。

关于css - 是否有全 View 高度的 Bootstrap 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58266149/

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