<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>hover给图片加遮罩</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<style type="text/css">
.picbox {
width: 100%;
height: 0;
padding-bottom: 133%;
float: left;
position: relative;
margin-bottom: 8px;
}
.picbox img {
max-width: 100%;
height: auto;
position: absolute;
left: 0;
top: 0;
}
.picbox:hover .video {
display: block;
}
.video{
position: relative;
top: -70px;
display: none;
}
</style>
</head>
<body>
<div class="picbox">
<img src="44.jpg" alt="123">
<img class="video" src="video.png" alt="">
</div>
</body>
</html>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>hover给图片加遮罩</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<style type="text/css">
.picbox {
width: 100%;
height: 0;
padding-bottom: 133%;
float: left;
position: relative;
margin-bottom: 8px;
}
.picbox img {
max-width: 100%;
height: auto;
position: absolute;
left: 0;
top: 0;
}
.picbox:hover .video {
display: block;
}
.video{
position: relative;
top: -70px;
display: none;
}
</style>
</head>
<body>
<div class="picbox">
<img src="44.jpg" alt="123">
<img class="video" src="video.png" alt="">
</div>
</body>
</html>