即使滚动条打开,我也试图让我的加载屏幕覆盖整个页面!
.loading
{
position:absolute;
background: #CFECF9;
filter:alpha(opacity=50);
opacity:0.75;
z-index:20;
left:0;
top:0;
height:100%;
width:100%;
vertical-align:middle;
text-align:center;
}
答案 0 :(得分:1)
要使元素覆盖整个屏幕,请将其修复:
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
/* Apply other styles */
}
绝对定位元素只会覆盖其父容器。
答案 1 :(得分:0)
.loading {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
background: #CFECF9;
filter:alpha(opacity=50);
opacity:0.75;
z-index:20;
vertical-align:middle;
text-align:center;
}