这工作:中心调整大小过于
$.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
};
$('#container').center();
..但该元素停留在相同的位置,如果窗口大小,我该如何与调整大小过于居中?
感谢