css+js实现炫酷混音视觉动画播放效果代码
代码语言:html
所属分类:动画
代码描述:css+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/bootstrap-icons.1.5.css"> <style> :root { --bg-color: #f5db02; --black: #000204; --dark-blue: #093243; --blue-blue: #005669; --light-blue: #00ad9f; --pink: #721839; } @keyframes rot { to { transform: translate(-50%, -50%) rotate(360deg); } } .rot-animation-500ms { animation: rot 500ms infinite linear; } .rot-animation-1000ms { animation: rot 1s infinite linear; } @keyframes light { to { box-shadow: 0 0 10px 2px var(--pink); } } .light-animation-delay-1 { animation: light 1s infinite 100ms linear; } .light-animation-delay-2 { animation: light 1s infinite 200ms linear; } .light-animation-delay-3 { animation: light 1s infinite 300ms linear; } .light-animation-delay-4 { animation: light 1s infinite 400ms linear; } .light-animation-delay-5 { animation: light 1s infinite 500ms linear; } @keyframes top-down { 0% { top: 10%; } 25% { top: 30%; } 50% { top: 20%; } 60% { top: 40%; } 70% { top: 20%; } 80% { top: 40%; } 100% { top: 0; } } .top-down-animation-delay-1 { animation: top-down 1s infinite 300ms; } .top-down-animation-delay-2 { animation: top-down 1s infinite 600ms; } .top-down-animation-delay-3 { animation: top-down 1s infinite 900ms; } @keyframes top { to { top: calc(100% - 8px); } } .top-animation-delay-1 { animation: top 1s infinite 300ms alternate; } .top-animation-delay-2 { animation: top 1s infinite 600ms alternate; } .top-animation-delay-3 { animation: top 1s infinite 900ms alternate; } @keyframes opacity { from { opacity: 0.7; } to { opacity: 1; } } .opacity-1 { opacity: 1 !important; } .opacity-2 { animation: opacity 1s infinite alternate; } .box-shadow-1 { box-shadow: 0 0 10px 2px var(--pink); } .box-shadow-2 { box-shadow: 0 0 6px 1px var(--light-blue); } .box-shadow-3 { box-shadow: 0 0 10px 5px var(--pink); } .border { border: 2px solid var(--light-blue); border-right-color: transparent; border-left-color: transparent; } * { margin: 0; } body { display: grid; place-items: center; width: 100vw; height: 100vh; background: linear-gradient(45deg, #000000 10%, #093243 100%); } body .container { width: 300px; height: 300px; } body .container .mixer { position: relative; width: 100%; height: 200px; border-radius: 1rem; background: linear-gradient(0deg, #000000 10%, #093243 100%); } body .container .mixer .left-dots { left: 1.5rem; } body .container .mixer .right-dots { right: 1.5rem; } body .container .mixer .dots { position: absolute; top: 2rem; display: flex; justify-content: flex-start; align-items: flex-start; gap: 4px; width: 75px; height: 30px; } body .container .mixer .dots .dot { position: relative; width: 12px; aspect-ratio: 1/1; background-color: var(--pink); box-shadow: 1px 1px 2px 2px #b6285c inset; } body .container .mixer .dots .dot .inside-dot { position: absolute; left: 0; top: calc(100% + 4px); width: 12px; aspect-ratio: 1/1; background-color: var(--pink); box-shadow: 1px 1px 2px 2px #b6285c inset; } body .container .mixer .left-circle { left: 1.5rem; } body .container .mixer .right-circle { right: 1.5rem; } body .container .mixer .circle { position: absolute; top: 4.5rem; width: 90px; aspect-ratio: 1/1; border-radius: 50%; background-color: #002e38; border: 1px solid black; } body .container .mixer .circle .inside-circle-1 { position: absolute; width: 80%; aspect-ratio: 1/1; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); border-radius: 50%; background-color: var(--blue-blue); transition-duration: 1s; } body .container .mixer .circle .inside-circle { position: absolute; width: 30%; aspect-ratio: 1/1; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); border-radius: 50%; border: 2px dotted white; transition-duration: 1s; } body .container .mixer .circle .inside-circle .inside-circle-2 { position: absolute; width: 60%; aspect-ratio: 1/1; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); border-radius: 50%; border: 2px dotted var(--pink); } body .container .mixer .right-dashes { right: 4.5rem; } body .container .mixer .left-dashes { left: 1rem; } body .container .mixer .dashes, body .container .mixer .dashes::before, body .container .mixer .dashes::after { position: absolute; bottom: 1rem; width: 25px; aspect-ratio: 3/1; background-color: var(--pink); opacity: 0.5; } body .container .mixer .dashes::after { content: ""; opacity: 1; bottom: 0; left: 1.75rem; } body .container .mixer .dashes::before { content: ""; opacity: 1; bottom: 0; left: 3.5rem; } body .container .mixer .screen-top { position: absolute; top: 2rem; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; gap: 3px; padding-top: 3px; width: 50px; aspect-ratio: 1/1; backgrou.........完整代码请登录后点击上方下载按钮下载查看
网友评论0