<template>
 	 <div id="app">
		<div id="mask" ref="mask" @click="mask()">
     		 <img src="..." class="mask_img">
 		</div>
 	</div>
 </template>
mounted() {
    this.$refs.mask.style.height = window.document.getElementById('app').clientHeight + 'px'
  },
#mask{
  width: 100%;
  opacity: 0.6;
  background-color: black;
  bottom: 0;
  left: 0;
  position: fixed;
  z-index: 998;
}
.mask_img{
  width: 316px;
  height: 200px;
  z-index: 999;
  position: fixed;
  right: 0px;
}

在这里插入图片描述

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐