<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>判断鼠标进入方向</title>
<style>
html,body{
margin:0;
padding:0;
}
.wrap{
width:300px;
height:300px;
position: relative;
margin:50px;
overflow: hidden;
}
.mask{
width: 100%;
height: 100%;
position: absolute;
top: 100%;
left: 0;
background: black;
opacity: .5;
color: white;
font-size: 30px;
line-height: 300px;
text-align: center;
}
.img{
width: 100%;
height: 100%;
background:#33aa00;
display:inline-block;
font-size:50px;
text-align:center;
line-height:300px;
}
</style>
&l
js判断鼠标移入的方向并触发事件
最新推荐文章于 2024-06-04 14:51:57 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)