简体   繁体   English

内层div可见

[英]Overlay inner div visible

I have added an overlay div to be shown when the page gets refresh/reload. 我添加了一个覆盖div ,以在页面刷新/重新加载时显示。 It works properly. 它正常工作。 But the problem is after the page successfully loaded the place where I created the div shows the "loading" message. 但是问题是在页面成功加载后,我创建div的地方显示了“正在加载”消息。

here is my code: style: 这是我的代码:样式:

#overlay {
    position: fixed;
    top: 20%;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: white;
    z-index: 999;
    visibility: hidden;
}

#overlay div {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5em;
    height: 2em;
    margin: -1em 0 0 -2.5em;
    color: #000;
    font-weight: bold;
}

Try This One 试试这个

#container{
       position:relative;
   z-index:0;
}
#overlay {
   visibility:hidden; 
   top: 20%;
   right: 0;
   bottom: 0;
   left: 0;
   background-color: white;
   z-index: 999;
   position: absolute; 
}
#overlay div   
{ 
position: absolute;
top: 50%;
left: 50%;
width: 5em;
height: 2em;
margin: -1em 0 0 -2.5em;
color: #000;
font-weight: bold;
} 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM