写了一个简单的仿土豆的视频悬浮效果
上代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> a { display: block; height: 252px; width: 448px; position: relative; } .perspective { width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; display: none; background:rgba(0,0,0,0.4) url("images/arr.png") no-repeat center; } a:hover .perspective { display: block; } </style> </head> <body> <a href="#"> <img src="https://r1.ykimg.com/050C00005AEBF733AD9AB72852052793" height="252" width="448" > <div class="perspective"></div> </a> </body> </html>