ポップアップ div がありposition:fixed
ます。最初は、コンテンツが読み込まれないまで、読み込み中の画像を表示したいと考えています。
私が使った
this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px");
this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px");
画面に従ってdivを中央に配置します。それは正常に動作します。
コンテンツが単純なテキストの段落から複雑なフォームに及ぶため、コンテンツがロードされた後に問題が発生し、それらは右および下方向に拡張されます。私のdivはその小さな「読み込み」画像に従って中央に配置されていたので、新しいコンテンツでは右と下に向かっています。
div を 4 方向すべてに拡張する方法はありますか。