div的高度,如剩余高度 [英] div's height like remaining height
本文介绍了div的高度,如剩余高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个div
<div id="uno">
text
</div>
<div id="due">
text
</div>
div#uno{
width:300px;
height: 100px;
border: 1px solid blue;
overflow:hidden;
}
div#due{
width:300px;
height: 200px;
border: 1px solid yellow;
overflow:scroll;
}
如何让div id =due的高度等于页面的剩余高度?
how can i have the height of the div id="due" equal to the remaining height of the page?
推荐答案
确保您指定了HTML 4.01或XHTML 1.x或更高版本的DOCTYPE: / p>
Make sure you have a HTML 4.01 or XHTML 1.x or later doctype specified:
div#uno{
position:absolute;
width:300px;
height:100px;
top:0px;
border:1px solid blue;
overflow:hidden;
}
div#due{
position:absolute;
width:300px;
top:100px;
bottom:0px;
border:1px solid yellow;
overflow:scroll;
}
这篇关于div的高度,如剩余高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文