我在colum child div里面使用row和colum bootstrap我给高度:100%但它需要全高? [英] I am using row and colum bootstrap inside of colum child div I am give height:100% but it take full height?
问题描述
I am using row and colum bootstrap4.Inside of colum child div i am give height:100% but it take full height?
我正在使用bootstrap 4.In ipad div(。
I am using bootstrap 4.In ipad div(.
full-heigt
)身高100%没有出现。请帮助我。
我尝试过:
< div class =container>
< div class =row>
< div class =col-md-6>
< p> test< / p>
< / div>
< div class =col-md-6 full-heigt>
< p>测试测试测试< / p>
< / div>
< / div>
< ; / div>
.full-heigt {
身高:100%;
背景:#000;
}
.full-heigt height:100%不出现。
) height 100% not appearing.Please help me.
What I have tried:
<div class="container">
<div class="row">
<div class="col-md-6">
<p>test</p>
</div>
<div class="col-md-6 full-heigt">
<p>test test test test</p>
</div>
</div>
</div>
.full-heigt{
height:100%;
background:#000;
}
.full-heigt height:100% not appear.
推荐答案
height:100%;
表示它将占用包含元素的全高 。您需要确保元素的每个祖先 - 包括html
和正文
元素 - 足够高,符合您的要求。
如果您只想让元素占据视口高度的100%,那么使用height :100vh;
代替。
视口单位:vw,vh,vmin,vmax - 网页设计周刊 [ ^ ]
height: 100%;
means it will take the full height of the containing element. You would need to make sure that every ancestor of the element - including thehtml
andbody
elements - was tall enough for your requirements.
If you just want the element to take 100% of the viewport height, then useheight: 100vh;
instead.
Viewport units: vw, vh, vmin, vmax - Web Design Weekly[^]
这篇关于我在colum child div里面使用row和colum bootstrap我给高度:100%但它需要全高?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!