div+css实现音频波动频谱动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现音频波动频谱动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; background-color: #000; } .hold { width: 400px; height: 75px; display: flex; align-items: center; justify-content: center; gap: 3px; } .line { height: 65px; width: 6px; background-color: #fff; background: linear-gradient(#ff3b94, #af3dff); border-radius: 5px; transition: all 1s; } .line1 { left: 8px; animation: move 0.75s linear infinite alternate; animation-delay: 0.25s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line2 { left: 16px; animation: move 0.75s linear infinite alternate; animation-delay: 0.5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line3 { left: 24px; animation: move 0.75s linear infinite alternate; animation-delay: 0.75s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line4 { left: 32px; animation: move 0.75s linear infinite alternate; animation-delay: 1s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line5 { left: 40px; animation: move 0.75s linear infinite alternate; animation-delay: 1.25s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line6 { left: 48px; animation: move 0.75s linear infinite alternate; animation-delay: 1.5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line7 { left: 56px; animation: move 0.75s linear infinite alternate; animation-delay: 1.75s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line8 { left: 64px; animation: move 0.75s linear infinite alternate; animation-delay: 2s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line9 { left: 72px; animation: move 0.75s linear infinite alternate; animation-delay: 2.25s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line10 { left: 80px; animation: move 0.75s linear infinite alternate; animation-delay: 2.5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line11 { left: 88px; animation: move 0.75s linear infinite alternate; animation-delay: 2.75s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line12 { left: 96px; animation: move 0.75s linear infinite alternate; animation-delay: 3s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line13 { left: 104px; animation: move 0.75s linear infinite alternate; animation-delay: 3.25s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line14 { left: 112px; animation: move 0.75s linear infinite alternate; animation-delay: 3.5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line15 { left: 120px; animation: move 0.75s linear infinite alternate; animation-delay: 3.75s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line16 { left: 128px; animation: move 0.75s linear infinite alternate; animation-delay: 4s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line17 { left: 136px; animation: move 0.75s linear infinite alternate; animation-delay: 4.25s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line18 { left: 144px; animation: move 0.75s linear infinite alternate; animation-delay: 4.5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line19 { left: 152px; animation: move 0.75s linear infinite alternate; animation-delay: 4.75s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line20 { left: 160px; animation: move 0.75s linear infinite alternate; animation-delay: 5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line21 { left: 168px; animation: move 0.75s linear infinite alternate; animation-delay: 5.25s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line22 { left: 176px; animation: move 0.75s linear infinite alternate; animation-delay: 5.5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line23 { left: 184px; animation: move 0.75s linear infinite alternate; animation-delay: 5.75s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line24 { left: 192px; animation: move 0.75s linear infinite alternate; animation-delay: 6s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line25 { left: 200px; animation: move 0.75s linear infinite alternate; animation-delay: 6.25s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line26 { left: 208px; animation: move 0.75s linear infinite alternate; animation-delay: 6.5s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line27 { left: 216px; animation: move 0.75s linear infinite alternate; animation-delay: 6.75s; } @-moz-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-webkit-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @-o-keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } @keyframes move { 0% { top: 0; height: 65px; } 100% { top: 15px; height: 25px; } } .line28 { left: 224px; animation: move 0.7.........完整代码请登录后点击上方下载按钮下载查看
网友评论0