css+div实现光芒四射旋转动画效果代码

代码语言:html

所属分类:动画

代码描述:css+div实现光芒四射旋转动画效果代码

代码标签: css div 光芒 四射 旋转 动画

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

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

<head>
    <meta charset="UTF-8">
    <style>
        body {
      background: #171c1a;
      margin: 400px;
      overflow: hidden;
    }
    
    body div {
      -webkit-animation: anim 3s infinite;
              animation: anim 3s infinite;
      border-radius: 50%;
      opacity: 0;
      position: absolute;
      width: 12px;
      height: 12px;
    }
    
    div:nth-child(1) {
      -webkit-animation-delay: 0.05s;
              animation-delay: 0.05s;
      background: radial-gradient(white, #f5503d);
      box-shadow: 0 0 10px #f5503d;
      transform: perspective(10px) rotate(6deg) translate3d(60%, 60%, 0) rotateY(60deg);
    }
    
    div:nth-child(2) {
      -webkit-animation-delay: 0.1s;
              animation-delay: 0.1s;
      background: radial-gradient(white, #f5623d);
      box-shadow: 0 0 10px #f5623d;
      transform: perspective(10px) rotate(12deg) translate3d(120%, 120%, 0) rotateY(120deg);
    }
    
    div:nth-child(3) {
      -webkit-animation-delay: 0.15s;
              animation-delay: 0.15s;
      background: radial-gradient(white, #f5743d);
      box-shadow: 0 0 10px #f5743d;
      transform: perspective(10px) rotate(18deg) translate3d(180%, 180%, 0) rotateY(180deg);
    }
    
    div:nth-child(4) {
      -webkit-animation-delay: 0.2s;
              animation-delay: 0.2s;
      background: radial-gradient(white, #f5873d);
      box-shadow: 0 0 10px #f5873d;
      transform: perspective(10px) rotate(24deg) translate3d(240%, 240%, 0) rotateY(240deg);
    }
    
    div:nth-child(5) {
      -webkit-animation-delay: 0.25s;
              animation-delay: 0.25s;
      background: radial-gradient(white, #f5993d);
      box-shadow: 0 0 10px #f5993d;
      transform: perspective(10px) rotate(30deg) translate3d(300%, 300%, 0) rotateY(300deg);
    }
    
    div:nth-child(6) {
      -webkit-animation-delay: 0.3s;
              animation-delay: 0.3s;
      background: radial-gradient(white, #f5ab3d);
      box-shadow: 0 0 10px #f5ab3d;
      transform: perspective(10px) rotate(36deg) translate3d(360%, 360%, 0) rotateY(360deg);
    }
    
    div:nth-child(7) {
      -webkit-animation-delay: 0.35s;
              animation-delay: 0.35s;
      background: radial-gradient(white, #f5be3d);
      box-shadow: 0 0 10px #f5be3d;
      transform: perspective(10px) rotate(42deg) translate3d(420%, 420%, 0) rotateY(420deg);
    }
    
    div:nth-child(8) {
      -webkit-animation-delay: 0.4s;
              animation-delay: 0.4s;
      background: radial-gradient(white, #f5d03d);
      box-shadow: 0 0 10px #f5d03d;
      transform: perspective(10px) rotate(48deg) translate3d(480%, 480%, 0) rotateY(480deg);
    }
    
    div:nth-child(9) {
      -webkit-animation-delay: 0.45s;
              animation-delay: 0.45s;
      background: radial-gradient(white, #f5e23d);
      box-shadow: 0 0 10px #f5e23d;
      transform: perspective(10px) rotate(54deg) translate3d(540%, 540%, 0) rotateY(540deg);
    }
    
    div:nth-child(10) {
      -webkit-animation-delay: 0.5s;
              animation-delay: 0.5s;
      background: radial-gradient(white, #f5f53d);
      box-shadow: 0 0 10px #f5f53d;
      transform: perspective(10px) rotate(60deg) translate3d(600%, 600%, 0) rotateY(6.........完整代码请登录后点击上方下载按钮下载查看

网友评论0