先把设置遮罩层的div放到需要遮罩层的div层级的上面再加上css代码
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent;
如有z-index 则自行对应设置
先把设置遮罩层的div放到需要遮罩层的div层级的上面再加上css代码
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent;
如有z-index 则自行对应设置