gpt4 book ai didi

jquery - JS fiddle : Making div occupy 100% height

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

我正在准备一个 fiddle 来问另一个问题,但在制作 fiddle 时无意中遇到了另一个问题。

这是 fiddle 的链接.

HTML代码:

<div class="outer-container">
<div class="inner-container">
<div class="slider-one slide" style="background-image:url('http://208.131.135.54/~imacre17/wp-content/uploads/2015/03/homeslide1a.png'); height: 100%; background-size: cover;" class="slider-background-image' ">
<div class="slide-inner-container">

<div class="clearfix"></div>
</div><!-- /.slide-inner-container -->
</div><!-- /.slide -->
<div class="slider-one slide" style="background-image:url('http://208.131.135.54/~imacre17/wp-content/uploads/2015/02/2-Home-membership.jpg'); height: 100%; background-size: cover;" class="slider-background-image' ">
<div class="slide-inner-container">
<!-- More content here soon -->
</div><!-- /.slide-inner-container -->
</div><!-- /.slide -->
<div class="slider-one slide" style="background-image:url('http://208.131.135.54/~imacre17/wp-content/uploads/2015/02/2-Home-special-events.jpg'); height: 100%; background-size: cover;" class="slider-background-image' ">
<div class="slide-inner-container">
<!-- More content here soon -->
</div><!-- /.slide-inner-container -->
</div><!-- /.slide -->
<div class="slider-one slide" style="background-image:url('http://208.131.135.54/~imacre17/wp-content/uploads/2015/03/CORKHome-_position4.jpg'); height: 100%; background-size: cover;" class="slider-background-image' ">
<div class="slide-inner-container">
<!-- More content here soon -->
</div><!-- /.slide-inner-container -->
</div><!-- /.slide -->


</div><!-- /.inner-container -->
</div><!-- /.outer-container -->

有四个类为.slide 的div,每个div 都以内联样式添加了背景图像。每个 div 也应用了 100% 的高度。

如果我在 HTML 页面中应用相同的样式,一切都很好,这里是 link .如何让 div 占据 100% 的高度。

最佳答案

你可以添加position:fixed; height:100%; 滑动类

关于jquery - JS fiddle : Making div occupy 100% height,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30833684/

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