[英]Auto adjust height of a div
我想用窗口的高度做一個div,但是高度可以自動升級嗎?
$(document).ready(function() {
var hpd = $(document).height();
var hph = $(".header").height();
$('.wrapper').css({height: hpd })
$('.contenido').css({height: hpd-hph-1 })
});
嘗試這個
$(document).ready(function(){
$(window).resize(function(){
$(".example").height ($(this).height());
});
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.