如何让一个div的高度和屏幕的高度是一致的

 window.onload=function (){ 
 function auto_height() 
 { 
     document.getElementById("box").style.height=document.documentElement.clientHeight+"px"; 

     } 
     auto_height(); 
         onresize=auto_height; 
}   

猜你喜欢

转载自blog.csdn.net/y6s6y6y/article/details/80992710
今日推荐