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);
                    }
                });
            });
原文地址:https://www.cnblogs.com/kevin0709/p/3392990.html