我正在使用BootStrap并面临Jumbotrons的问题。 我的页面上有2个div,第二个应该假设采用剩余的屏幕大小。但是当我改变浏览器的高度和宽度时,它没有相应调整,因为div的高度没有得到调整。
HTML:
<div class="jumbotron" id="jumbo1">
<div class="container">
<h1>Some Txt.</h1>
</div>
</div>
<div class="jumbotron" id="jumbo2">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuri.
</p>
<div class="container-fluid">
<section id="gly"> <span class="glyphicon glyphicon-arrow-down" aria-hidden="true" id="dwnarrow"></span>
</section>
</div>
</div>
CSS:
html,body
{
height: 100%;
width: 100%;
}
#jumbo1
{
height:auto;
}
#jumbo2
{
padding: 0px;
max-height: 100%;
}
#gly
{
text-align: center;
margin-top: 300px;
}
谁能告诉我这里做错了什么???
答案 0 :(得分:0)
这是因为max-height: 100%;
#jubmo2
答案 1 :(得分:0)
这应该可以解决问题
html, body{
height:100%;
}
#jumbo1 {
height:100%;
}
.container-fluid {
text-align:center;
}
#gly {
display:inline;
position:absolute;
bottom:20px;
}
直接在您的页面中试用。