gpt4 book ai didi

html - css 100vh 没有将 div 设置为 100% 高度

转载 作者:太空宇宙 更新时间:2023-11-04 10:26:13 25 4
gpt4 key购买 nike

如下图所示

enter image description here

视口(viewport)高度覆盖了大约 97% 而不是 100%。下一节可以看到。我现在被这个问题困扰了几个小时,下面是我的 css 和 html 代码

CSS

html, body {
width: 100%;
height: 100%;
}

.section-3 {
background: url(../images/section-3-bg.jpg) center center;
background-size: cover;
position: relative;
height:100vh;
}

HTML

<section class="section-3 col-xs-12" id="demand">
<section class="container">
<center>
<div id="trapezium"></div>
<h1 class="blue big-font">On Demand Charters</h1>
<img src="images/demand-border.png" alt="" class="img-responsive" style="width:auto;">
<div class="col-md-7 col-md-push-2">
<p class="medium-font">With Powerfly, access a range of aircraft from light
to large jets, turboprops and helicopters
either through on-demand charters. All you need to
do is book and a Powerfly executive will customise
your plan as per your needs.
</p>
<h2 class="explore-btn"><a href="demand.html">Details</a></h2>
</div>
</center>
</section>
</section>

最佳答案

真正的问题是轮播!

#carousel-generic-1 {
margin-top: 0;
}

关于html - css 100vh 没有将 div 设置为 100% 高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36769111/

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