gpt4 book ai didi

html - Jumbotron 不随屏幕/浏览器大小调整

转载 作者:行者123 更新时间:2023-11-28 07:46:40 25 4
gpt4 key购买 nike

我在使用 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;
}

谁能告诉我我做错了什么???

最佳答案

这应该可以解决问题

html, body{
height:100%;
}

#jumbo1 {
height:100%;
}

.container-fluid {
text-align:center;
}

#gly {
display:inline;
position:absolute;
bottom:20px;
}

直接在您的页面中尝试。

关于html - Jumbotron 不随屏幕/浏览器大小调整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30660800/

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