这是我的页面URL
在这个页面上,如果我们点击“登录”按钮,将显示一个带有黑色背景的弹出窗口。但是如果我们缩小页面,则会减小背景颜色的大小。但是我想要在缩小页面时覆盖整个屏幕背景。我在我的页面中使用了以下代码。
.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>
我不知道如何为我的登录页面背景做同样的事情。 请有人帮助我解决这个问题。
40个请求
❘855.30KB传输
|DOMContentLoaded: 1.9分钟
- Tomas Ramirez Sarduy