遮罩层的实现

遮罩层

遮罩层的实现主要是利用 css。 元素相同的 z-index,遮罩层外面的 z-index 小于里面的

image-201803221954522

image-201803221956209

1
2
3
4
5
6
7
8
.shade{
position:fixed;
height:100%;
top:0px;
left:0px;
background-color:rgba(0,0,0,0.5); // 背景的透明度

}
感谢你的打赏哦!