div 自动满屏

通常通过jq来做,类似这样:

$('#navigation').css({ height: $(window).innerHeight() });

 

css3后,只需要用 下面这段样式即可

#navigation
{
  height:100vh;
}

 

更多详细资料参考:http://stackoverflow.com/questions/1575141/make-div-100-height-of-browser-window

posted @ 2016-07-25 15:34  tommy.yu  阅读(227)  评论(0编辑  收藏  举报