js+css实现一个机器狗跟随音乐跳舞动画代码

代码语言:html

所属分类:动画

代码描述:js+css实现一个机器狗跟随音乐跳舞动画代码

代码标签: js css 机器狗 跟随 音乐 跳舞 动画 代码

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

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

<head>
    <meta charset="UTF-8">
<style>
    body {
  align-items: center;
  display: flex;
  height: 100vh;
  justify-content: center;
  margin: 0;
  background: linear-gradient(
    0deg,
    rgba(158, 217, 198, 1) 0%,
    rgba(158, 217, 198, 1) 40%,
    rgba(199, 255, 221, 1) 40%,
    rgba(199, 255, 221, 1) 100%
  );
}

body[onload] > *,
body[onload] > * *,
body.play-animation > *,
body.play-animation > * * {
  animation-play-state: running;
}

body[onload] audio {
  display: none;
}

.container {
  position: relative;
  font-size: clamp(8px, 2vmin, 17px);
}

.arm-wrapper,
.arm-2,
.spot-body,
.details,
.top-leg-1,
.bottom-leg-1,
.top-leg-2,
.bottom-leg-2,
.top-leg-3,
.bottom-leg-3,
.top-leg-4,
.bottom-leg-4,
.shadow {
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  animation-play-state: paused;
}

.arm-wrapper {
  animation-name: moveBody;
}

.arm-wrapper > * {
  position: absolute;
}

.spot-arm {
  background: #262626;
  height: 2.3em;
}

.arm-base {
  border-radius: 15% 0% 58% 0% / 15% 0% 58% 0%;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0