function bodyHeight() { var bodyHeight=document.documentElement.clientHeight-50; $("#projectHeight").css({ "height": bodyHeight * 0.7 }); $("#reportHeight").css({ "height": bodyHeight * 0.7 }); $("#waitTaskHeight").css({ "height": bodyHeight * 0.3 }); $("#messageHeight").css({ "height": bodyHeight * 0.3 }); $("#attentionHeight").css({ "height": bodyHeight * 0.3 }); $("#commonFuncHeight").css({ "height": bodyHeight * 0.3 }); $("#box").css({ "height": bodyHeight * 0.3 - 63 }); $("#message").css({ "height": bodyHeight * 0.3 - 63 }); $("#attentionBodyHeight").css({ "height": bodyHeight * 0.3 - 43 }); $("#commonFunction").css({ "height": bodyHeight * 0.3 - 63 }); }
jquery根据页面可见区域,动态设置每一部分div的高度
最新推荐文章于 2023-04-05 20:02:27 发布