设置 div自适应高度
<body>
<div class = "row">
<div id = "top" >上部 </div>
<div id = "main">中间部分 </div>
<div id = "bottom" >底部</div>
</div>
<script>
jQuery('#right').css('min-height',(jQuery('body').height()-175)+"px");
</script>
</body>
175为top和bottom2部分高的和。也可通过jquery动态获取jQuery('#top').height()+jQuery('#bottom').height()
设置min-height最小高度,这样中间部分高度可以自动扩大
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。