這是我的網頁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
爲什麼'身高:2000%'? –
如果我給高度爲200%,它只是停止標題上方的背景。 – Rithu