视频播放按钮点击播放动态切换效果
代码语言:html
所属分类:多媒体
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Poppins:300,400,500,700&display=swap'> <style> .wrapper { --color: #1F242D; --color-invert: #ffffff; --clip-path: circle(15px at left); --clip-path-hover: circle(70px at left); --clip-path-clicked: circle(100vw at left); --duration: .4s; --timing-function: ease; position: relative; display: flex; justify-content: center; align-items: center; width: 100%; } .wrapper .video { height: 100vh; overflow: hidden; display: flex; justify-content: center; align-items: center; margin-left: 15px; -webkit-clip-path: var(--clip-path); clip-path: var(--clip-path); transition: -webkit-clip-path var(--duration) var(--timing-function); transition: clip-path var(--duration) var(--timing-function); transition: clip-path var(--duration) var(--timing-function), -webkit-clip-path var(--duration) var(--timing-function); } .wrapper .video video { position: fixed; background: #c4cbde; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .wrapper .text { position: relative; text-transform: uppercase; font-weight: 600; letter-spacing: .2px; opacity: var(--opacity,1); transition: opacity 0.3s var(--timing-function) 0.2s; } .wrapper .text::before, .wrapper .text::after { content: ""; position: absolute; bottom: 0; left: -1px; right: 25px; height: 0; } .wrapper .text::before { box-shadow: 26px 0 0 1px var(--color); right: var(--r,100%); opacity: var(--opacity,0); transition: right .5s ease-in, opacity .1s linear; } .wrapper .text::after { box-shadow: 26px 0 0 1px var(--color-invert); -webkit-clip-path: var(--clip-path); clip-path: var(--clip-path); transition: -webkit-clip-path var(--duration) var(--timing-function); transition: clip-path var(--duration) var(--timing-function); transition: clip-path var(--duration) var(--timing-function), -webkit-clip-path var(--duration) var(--timing-function); } .wrapper .text > span::before, .wrapper .text > span::after { content: attr(data-text); padding-left: 26px; } .wrapper .text > span::before { color: var(--color); } .wrapper .text > span::after { color: var(--color-invert); -webkit-clip-path: var(--clip-path); clip-path: var(--clip-path); transition: -webkit-clip-path var(--duration) var(--timing-function); transition: clip-path var(--duration) var(--timing-function); transition: clip-path var(-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0