动画位于屏幕中央

var topOffset = ($(window).height() - 175) / 2,
var leftOffset = ($(window).width() - $('loading').width()) / 2 - 60;

                $('.loading').css({
                    top: topOffset,
                    left: leftOffset,
                    right: 'auto',
                    bottom: 'auto'
                });

posted @ 2015-08-17 16:37  简单就好zyx  阅读(139)  评论(0)    收藏  举报