질문 : jQuery를 사용하여 DIV를 화면 중앙에 배치 jQuery를 사용하여 화면 중앙에 를 설정하려면 어떻게해야합니까? 답변 이 함수가 도움이되도록 jQuery에 함수를 추가하는 것을 좋아합니다. jQuery.fn.center = function () { this.css("position","absolute"); this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) + $(window).scrollTop()) + "px"); this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) + $(window).scrollLeft()) +..