摘要:
jQuery.fn.center = function () { this.css(“position”,”absolute”); this.css(“top”, ( $(window).height() – this.height() ) / 2+$(window).scrollTop() + “px”); this.css(“left”, ( $(window).width() – this.width() ) / 2+$(window).scrollLeft() + “px”); return this; } $(element).center(); 阅读全文
posted @ 2014-02-11 14:23 随遇 阅读(239) 评论(0) 推荐(0) 编辑