を使用して、画面全体をカバーする必要があります。しかし、ページをズームアウトすると、背景色のサイズが小さくなります。しかし、ズームアウトすれば全体の背景をカバーしたい。私は私のページで以下のコードを使用しました。ライトボックスの背景色は、我々はそれが黒の背景にポップアップ画面が表示されますサインインボタンをクリックする場合、これは、このページで</p> <p><a href="http://sample.com/mytest.php" rel="nofollow">http://sample.com/mytest.php</a></p> <p>私のページのURLであるCSS
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 2000%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
しかしテストページでは、背景全体をカバーするために以下のコードが使用されています。それはうまく動作します。
<style type="text/css">
/*give the body height:100% so that its child
elements can have percentage heights*/
body{ height:100% }
/*this is what we want the div to look like*/
div.fullscreen{
display:block;
/*set the div in the top-left corner of the screen*/
position:absolute;
top:0;
left:0;
background-color: black;
/*set the width and height to 100% of the screen*/
width:100%;
height:100%;
color: white;
}
</style>
<div class="fullscreen">
<p>Here is my div content!!</p>
</div>
ログインページの背景がわからない場合はどうすればよいですか。誰でもこの問題を解決するために私を助けてください。
ログインフォームのdivはどのように配置しますか?それはテーブルの中にありますか? – SubRed
なぜ 'height:2000%'ですか? –
高さを200%と指定すると、ヘッダーの上の背景が停止します。 – Rithu