如何用js解网页中间内容的高度自适应
//中间内容的高度自适应
$(function(){
var headerHeight = $(".header").get(0).offsetHeight;
var footerHeight = $(".footer").get(0).offsetHeight;
var minHeight = $(window).height() - headerHeight - footerHeight + 'px';
$(".main-content").css("min-height",minHeight);
});