var resizeDiv = function(){ heightWin = $(window).height(); heightWin2 = document.body.clientHeight; console.log("h1----"+heightWin+'h2---'+ heightWin2); document.getElementById('appListMain').style.height = heightWin-170 + 'px'; document.getElementById('divBody').style.height = heightWin-270 + 'px'; document.getElementById('appList').style.height = heightWin-100 + 'px'; } resizeDiv(); $(window).resize(function(){ resizeDiv(); });
div 高度随窗口动态变化
最新推荐文章于 2023-04-21 22:07:44 发布