元素模板为您解答,直接上代码
var winHeight = $(window).height(); $("#slider-eltron").css("height",winHeight); $(window).resize(function() { winHeight = $(window).height(); $("#slider-eltron").css("height",winHeight); });这里的slider-eltron就是要设置高度的div
var winHeight = $(window).height(); $("#slider-eltron").css("height",winHeight); $(window).resize(function() { winHeight = $(window).height(); $("#slider-eltron").css("height",winHeight); });这里的slider-eltron就是要设置高度的div
本文来源:jq 获取屏幕高度设置div
本文地址:https://www.ys720.com/jiaocheng/4576.html
版权声明:本文采用[BY-NC-SA]协议进行授权,如无特别说明,转载请注明本文地址!