我正在设计一个页面,其中 div 的底部应该接触没有底部边距或填充的页面末尾,所以我将主 div 的高度设置为
$(function() {
$('.divMain').css({'height': (($(window).height())) + 'px'});
$(window).resize(function() {
$('.divMain').css({'height': (($(window).height())) + 'px'});
});
});
我的 HTML 是:
<div class="divMain">
<table id="eduGrid"></table>
</div>
where"eduGrid"
是动态生成的(Bootstrap)。
最初它工作正常,但我在该 div 中有一些内容可以在用户端添加(添加新的教育等),以便内容移动到主 div 之外并且看起来是有线的。