<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.video {
position: relative;
margin: 50px auto;
width: 600px;
height: 400px;
}
img {
width: 100%;
height: 100%;
}
.mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: none;
background: url(images/arr.png) no-repeat center rgba(0, 0, 0, .6);
}
.video:hover > .mask {
display: block;
}
</style>
</head>
<body>
<div class="video">
<div class="mask"></div>
<img src="images/tudou.jpg" alt="">
</div>
</body>
</html>
视频封面鼠标经过显示遮罩
最新推荐文章于 2024-04-24 16:09:39 发布