鼠标悬浮出现播放按钮
时间:2024年03月03日
/来源:网络
/编辑:佚名
鼠标悬浮出现播放按钮效果图:
<!DOCTYPE html >
< html lang= "en" >
< head >
< meta charset= "UTF-8" >
< meta name= "viewport" content= "width=device-width, initial-scale=1.0" >
< meta http-equiv= "X-UA-Compatible" content= "ie=edge" >
< title >Document </ title >
< style >
.contain{
display: block;
width: 500px;
height: 300px;
margin: 100px;
border: 1px solid #000;
position: relative;
}
.mask{
width: 500px;
height: 300px;
position: absolute;
left: 0;
top: 0;
background: rgba( 0, 0, 0, .4) url( sun.png) no-repeat center;
display: none;
}
a:hover .mask{
display: block;
}
< / style >
</ head >
< body >
< a class= "contain" >
< img src= "fa.jpg" alt= "" style= "width: 100%; height: 100%;" >
< div class= "mask" ></ div >
</ a >
</ body >
</ html >
<!DOCTYPE html >
< html lang= "en" >
< head >
< meta charset= "UTF-8" >
< meta name= "viewport" content= "width=device-width, initial-scale=1.0" >
< meta http-equiv= "X-UA-Compatible" content= "ie=edge" >
< title >Document </ title >
< style >
.contain{
display: block;
width: 500px;
height: 300px;
margin: 100px;
border: 1px solid #000;
position: relative;
}
.mask{
width: 500px;
height: 300px;
position: absolute;
left: 0;
top: 0;
background: rgba( 0, 0, 0, .4) url( sun.png) no-repeat center;
display: none;
}
a:hover .mask{
display: block;
}
< / style >
</ head >
< body >
< a class= "contain" >
< img src= "fa.jpg" alt= "" style= "width: 100%; height: 100%;" >
< div class= "mask" ></ div >
</ a >
</ body >
</ html >
新闻资讯 更多
- 【建站知识】查询nginx日志状态码大于400的请求并打印整行04-03
- 【建站知识】Python中的logger和handler到底是个什么?04-03
- 【建站知识】python3拉勾网爬虫之(您操作太频繁,请稍后访问)04-03
- 【建站知识】xpath 获取meta里的keywords及description的方法04-03
- 【建站知识】python向上取整以50为界04-03
- 【建站知识】scrapy xpath遇见乱码解决04-03
- 【建站知识】scrapy爬取后中文乱码,解决word转为html 时cp1252编码问题04-03
- 【建站知识】scrapy采集—爬取中文乱码,gb2312转为utf-804-03