css弹出层覆盖底层具体实现
网站建设 2021-07-03 08:15www.dzhlxh.cn网站建设
复制代码
代码如下:#mcover {
position: fixed;
top: 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;
top: 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/vip_1.jpg"></div>
</div>
</a>
</li>