css弹出层覆盖底层具体实现

建站知识 2021-07-03 08:15www.168986.cn长沙网站建设

复制代码
代码如下:

#mcover {
position: fixed;
: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: none;
z-index: 20000;
}
#mcover img {
position: fixed;
right: 18px;
: 5px;
width: 260px!important;
height: 180px!important;
z-index: 20001;
}


复制代码
代码如下:

<li class="nine">
<a href="javascript:void(0);" class="">
<div id="mcover" onclick="document.getElementById('mcover').style.display='';" style="display:none;">
<img src="../images/guide.png">
</div>
<div class="war_main_2_1" style="text-align: center;" onclick="document.getElementById('mcover').style.display='block';">
<div class="war_main_1_1_2"><img src="../images/_1.jpg"></div>
</div>
</a>
</li>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by