div+css实现谐波轨道动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现谐波轨道动画效果代码

代码标签: div css 谐波 轨道 动画

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

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

<head>
  <meta charset="UTF-8">
  

  
  
<style>
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f7f9fc;
}

* {
  box-sizing: border-box;
}

.canvas {
  width: 300px;
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  animation: fadeIn 2s 1s ease forwards;
}

.row {
  position: absolute;
  width: 300px;
  height: 30px;
  top: 50%;
  left: 0;
  transform-origin: top center;
}
.row:nth-child(1) {
  transform: rotateZ(0deg) translateY(-50%);
}
.row:nth-child(1) .ball {
  background: linear-gradient(135deg, #3cdd3c, #17cf54);
  box-shadow: 0 0 8px rgba(20, 184, 20, 0.5);
  animation-delay: 0s;
}
.row:nth-child(2) {
  transform: rotateZ(15deg) translateY(-50%);
}
.row:nth-child(2) .ball {
  background: linear-gradient(135deg, #3cdd64, #17cf82);
  box-shadow: 0 0 8px rgba(20, 184, 61, 0.5);
  animation-delay: 0.0833333333s;
}
.row:nth-child(3) {
  transform: rotateZ(30deg) translateY(-50%);
}
.row:nth-child(3) .ball {
  background: linear-gradient(135deg, #3cdd8c, #17cfb0);
  box-shadow: 0 0 8px rgba(20, 184, 102, 0.5);
  animation-delay: 0.1666666667s;
}
.row:nth-child(4) {
  transform: rotateZ(45deg) translateY(-50%);
}
.row:nth-child(4) .ball {
  background: linear-gradient(135deg,.........完整代码请登录后点击上方下载按钮下载查看

网友评论0