jquery 浏览器放大缩小函数resize
<script> $(function(){ $(window).resize(function(){ var _height = $(window).height(); var _conheight = $('#footer').height(); var temp = (_height - _conheight)/2; if(temp>0) { $('#footer').css('margin-top', temp); }else { $('#footer').css('margin-top', 0); } }); });