css+js实现炫酷混音视觉动画播放效果代码

代码语言:html

所属分类:动画

代码描述:css+js实现炫酷混音视觉动画播放效果代码

代码标签: 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;
  background-color: black;
}
body .container .mixer .screen-top::after {
  content: "";
  position: absolute;
  left: -0.6rem;
  top: 0.5rem;
  width: 0.5rem;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background-color: var(--pink);
  box-shadow: 0 1rem 0 var(--pink), 0 2rem 0 var(--pink);
}
body .container .mixer .screen-top::before {
  content: "";
  position: absolute;
  right: -0.6rem;
  top: 0.5rem;
  width: 0.5rem;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background-color: var(--pink);
  box-shadow: 0 1rem 0 var(--pink), 0 2rem 0 var(--pink);
}
body .container .mixer .screen-top .column {
  position: relative;
  width: 12px;
  height: 60%;
  background: linear-gradient(0deg, transparent 0%, var(--pink) 100%);
  opacity: 0;
  transition-duration: 1s;
}
body .container .mixer .screen-bottom {
  position: absolute;
  left: 50%;
  top: 7rem;
  transform: translateX(-50%);
  background-color: var(--dark-blue);
  width: 40px;
  aspect-ratio: 2/1;
}
body .container .mixer .screen-bottom::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 0.5rem);
  background-color: var(--dark-blue);
  width: 100%;
  height: 0.25rem;
}
body .container .mixer .screen-bottom .screen-bottom-after {
  position: absolute;
  left: 4px;
  width: 5px;
  height: 100%;
  background-color: var(--light-blue);
  box-shadow: 7px 0 0 var(--light-blue), 14px 0 0 var(--light-blue), 21px 0 0 var(--light-blue), 28px 0 0 var(--light-blue);
  transition-duration: 1s;
  opacity: 0;
  transition-duration: 300ms;
}
body .container .mixer .columns-container {
  position: absolute;
  left: 50%;
  transform: translate(-50%);
  bottom: 0.5rem;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 0.25rem;
  width: 80px;
  aspect-ratio: 2/1;
}
body .container .mixer .columns-container .column {
  position: relative;
  height: 100%;
  width: 1px;
  background-color: var(--pink);
}
body .container .mixer .columns-container .column::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 2px;
  width: 10px;
  height: 1px;
  background-color: white;
  box-shadow: 0 3px 0 0 white, 0 6px 0 0 white, 0 9px 0 0 white, 0 12px 0 0 white, 0 15px 0 0 white, 0 18px 0 0 white, 0 21px 0 0 white, 0 24px 0 0 white, 0 27px 0 0 white, 0 30px 0 0 white;
}
body .container .mixer .columns-container .column .column-before {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 4px;
  width: 10px;
  aspect-ratio: 2/1;
  background-color: var(--light-blue);
  z-index: 2;
}
body .container .btns {
  margin-top: 1rem;
  display: flex;
  justify-conte.........完整代码请登录后点击上方下载按钮下载查看

网友评论0