使引导列触摸div的底部 [英] Make bootstrap column touch the bottom of the div
本文介绍了使引导列触摸div的底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道如何做到这一点,本质上我希望列从div的顶部到div的底部,当所述div有一个 min-height
100 %。但这不起作用:
I have no idea how to do this, essentially I want the columns to touch from top of div to bottom of div when said div has a min-height
of 100%. But this does not work:
html, body {
height: 100%;
}
body {
max-width: 1500px;
margin: 0 auto;
}
#wrapper {
min-height: 100%;
overflow: auto;
}
.container {
min-height: 100%;
overflow: auto;
}
.container .row .col-md-6 {
min-height: 100%;
}
包装器延伸到页面底部, 。它只会延伸到包含在的内容的结尾。
The wrapper extends to the bottom of the page, but the container div does not. It only extends to the end of the content contained with in.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
<div id="wrapper">
<div class="container">
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6"></div>
</div>
</div>
</div>
</body>
</html>
我遗漏了什么? body和html去100%,包装器100%,然后容器不会100%...为什么?
Is there something I am missing? The body and html go 100%, the wrapper goes 100% of that and then the container doesn't go 100% ... why?
推荐答案
您错过了一个。您应该使用 height
而不是 min-height
(演示)
.row {
height: 100%;
}
这篇关于使引导列触摸div的底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文