這工作:中心調整大小過於
$.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();
..但該元素停留在相同的位置,如果窗口大小,我該如何與調整大小過於居中?
感謝