我正在準備一個小提琴來提出另一個問題,但在做小提琴時偶然發現了另一個問題。JS小提琴:使div佔據100%的高度
以下是鏈接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也有100%的高度適用於它。
如果我在HTML頁面中應用相同的樣式一切都很好,這裏是link。如何讓div佔據100%的高度。
所以最新的問題是它沒有反應?請解釋發生了什麼以及需要解決什麼問題? @chandan –
你的問題是? –
@AndrewLyndem:它在標題中,使得div伸展100%的身高。感謝您的反對票。 – chandan