svg+js实现悬浮跟随式视频播放按钮播放效果代码

代码语言:html

所属分类:多媒体

代码描述:svg+js实现悬浮跟随式视频播放按钮播放效果代码

代码标签: svg js 悬浮 跟随式 视频 播放 按钮

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.5.0.css">

  
  
<style>
* {
  box-sizing: border-box;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: #111;
  align-content: center;
  gap: 2rem;
}

.video-player * {
  cursor: none;
}

video {
  width: 600px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  -o-object-fit: cover;
     object-fit: cover;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.video-player {
  position: relative;
  overflow: hidden;
}

button {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.cursor {
  pointer-events: none;
  width: 56px;
  border-radius: 0;
  aspect-ratio: 1;
  position: fixed;
  background: hsl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0