<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body{
margin:0;
}
.img{
width:300px;height:300px;
border: 1px solid #ddd;
position: relative;
}
#mask{
width:150px;height:150px;
background: lightyellow;
position:absolute;
}
.hide{
display:none;
}
.superMask{
width:300px;
height:300px;
position:absolute;
left:0;
top:0;
}
</style>
<script src=""></script>
</head>
<body>
<div >
<div class="img">
<div
:style="styleObj" :class="mask_hide">
</div>
</div>
<div class="superMask" @mousemove="move($event)" @mouseover="display(true)"
@mouseout="display(false)"></div>
</div>
</body>
<script>
var app = new Vue({
el: "#app",
data: {
mask_hide:{
"hide":true
},
styleObj:{
top:0,
left:0,
}
},
methods:{
move(e){
=-75+"px";
=-75+"px";
},
display(bool){
this.mask_hide.hide=!bool
},
}
});
</script>
</html>