js实现全屏视频缩略图点击切换效果代码
代码语言:html
所属分类:多媒体
代码描述:js实现全屏视频缩略图点击切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; font-family: "微软雅黑,"sans-serif; } section { position: relative; width: 100%; height: 100vh; } section video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } section .nav { position: absolute; bottom: 20%; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; align-items: center; } section .nav li { list-style: none; cursor: pointer; margin: 0 10px; background: #fff; padding: 3px 3px 0; opacity: .7; transition: .5s; } section .nav li:hover { opacity: 1; } section .nav li img { width: 120px; opacity: 1; } section .nav li img:hover { width: 200px; opacity: 1; } </style> </head> <body> <section> <video id="slider" autoplay muted loop> <source src="//repo.bfw.wiki/bfwrepo/video/5fbaf36455fb7.mp4"> <.........完整代码请登录后点击上方下载按钮下载查看
网友评论0