gpt4 book ai didi

html - Bootstrap 容器或填充高度 100% 浏览器

转载 作者:行者123 更新时间:2023-11-28 08:44:36 24 4
gpt4 key购买 nike

我需要将高度容器设置为 100% 浏览器,但是当你放置标签的内容时会破坏容器。

html, body {
height: 100%;
min-height: 100%;
}
.container {
min-height: 100%;
height: 100%;
background-color:red;
}
<div class="container">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<img class="img-responsive" src="http://placehold.it/1920x1080 " alt="" />
<img class="img-responsive" src="http://placehold.it/1920x1080 " alt="" />
</div>
</div>

最佳答案

使用 vh 表示全高。 100vh = 100%。现在,使用 container-fluid 在 bootstrap 3 上获得完整宽度

关于html - Bootstrap 容器或填充高度 100% 浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27657276/

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