js+css实现拖动音乐盘改变播放进度的音乐播放器效果代码
代码语言:html
所属分类:多媒体
代码描述:js+css实现拖动音乐盘改变播放进度的音乐播放器效果代码
代码标签: js css 拖动 光盘 改变 播放 进度 音乐 播放器
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Gentium+Basic:700|Gentium+Book+Basic:700|PT+Serif:700|Fira+Sans|Roboto&display=swap" rel="stylesheet"> <style> html { box-sizing: border-box; } html *, html *::before, html *::after { box-sizing: inherit; } body { background-color: #f0f0f0; color: #2d2d2d; margin: 0; font-family: 'Fira Sans', sans-serif; font-family: 'Roboto', sans-serif; -webkit-tap-highlight-color: transparent; overflow: hidden; } button { background: none; border: none; outline: none; font: inherit; -webkit-appearance: none; cursor: pointer; } .svg-icon { width: 2em; height: 2em; fill: currentColor; } .app { --app-gap: 3rem; height: 100vh; padding: 0 2rem; display: flex; flex-direction: column; align-items: center; gap: var(--app-gap); overflow-x: hidden; } @media (max-width: 600px) { .app { font-size: 12px; } } .disk-container { perspective: 600px; } #song { display: none; } .disk { display: flex; align-items: center; justify-content: center; width: 18em; height: 18em; background-image: url("//repo.bfw.wiki/bfwrepo/icon/6286c7ad45af2.png"); background-size: contain; border-radius: 50%; cursor: pointer; /* pointer-events: none; */ box-shadow: 0px 0px 30px 5px #5f5f5f5e; transform: rotateX(60deg); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .disk.focus { /* transform: scale(1.1) rotateX(30deg); */ } .innerdisk { width: 100px; height: 100px; border-radius: 50%; background-color: #fff; background-image: url("//repo.bfw.wiki/bfwrepo/icon/6286c7c06413b.jpg"); background-size: contain; } .disk.active { pointer-events: auto; } .timechange { margin-bottom: calc(-1 * var(--app-gap)); text-align: center; transform: translateY(-100px) scale(2); opacity: 0; transition: all 0.4s 0.1s ease-in; } .timechange.active { transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform: none; opacity: 1; } .song-info { } .singer { text-align: center; margin: 0 auto; text-transform: capitalize; font-size: 1.3em; font-weight: normal; } .title { flex: 1; --offset: 0; position: relative; display: table; margin: 0.2em auto; text-transform: capitalize; font-size: 4em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: 'PT Serif', ser.........完整代码请登录后点击上方下载按钮下载查看
网友评论0