div+css实现蝴蝶效应动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现蝴蝶效应动画效果代码

代码标签: div css 蝴蝶 效应 动画

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

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

<head>
    <meta charset="UTF-8">
    <style>
        body {
      background: black;
    }
    
    .wrap {
      width: 100vh;
      height: 80vh;
      margin: 8vh auto;
    }
    
    .left, .right {
      width: 50%;
      height: 100%;
      position: absolute;
      overflow: hidden;
    }
    .left:before, .right:before {
      content: "";
      display: block;
      width: 80px;
      height: 150px;
      border-radius: 50%;
      border-left: 3px solid #FFF;
      position: absolute;
      top: 15%;
      -webkit-transform: rotate(30deg) translateX(-20px);
              transform: rotate(30deg) translateX(-20px);
      -webkit-transform-origin: bottom right;
              transform-origin: bottom right;
    }
    
    .left {
      left: 0;
      -webkit-transform: scaleX(-1) translateX(100%);
              transform: scaleX(-1) translateX(100%);
      -webkit-transform-origin: 100% 0;
              transform-origin: 100% 0;
    }
    
    .right {
      right: 0;
      -webkit-transform-origin: 0 0;
              transform-origin: 0 0;
    }
    
    .circle {
      position: absolute;
      bottom: 65%;
      left: -5vh;
      width: 10vh;
      height: 10vh;
      border-radius: 50%;
      border: 1px solid #6e7fca;
      -webkit-transform-origin: 50% 100%;
              transform-origin: 50% 100%;
    }
    .circle:nth-child(1) {
      -webkit-animation: anim 30s 0.5s linear infinite;
              animation: anim 30s 0.5s linear infinite;
    }
    .circle:nth-child(2) {
      -webkit-animation: anim 30s 1s linear infinite;
              animation: anim 30s 1s linear infinite;
    }
    .circle:nth-child(3) {
      -webkit-animation: anim 30s 1.5s linear infinite;
              animation: anim 30s 1.5s linear infinite;
    }
    .circle:nth-child(4) {
      -webkit-animation: anim 30s 2s linear infinite;
              animation: anim 30s 2s linear infinite;
    }
    .circle:nth-child(5) {
      -webkit-animation: anim 30s 2.5s linear infinite;
              animation: anim 30s 2.5s linear infinite;
    }
    .circle:nth-child(6) {
      -webkit-animation: anim 30s 3s linear infinite;
              animation: anim 30s 3s linear infinite;
    }
    .circle:nth-child(7) {
      -webkit-animation: anim 30s 3.5s linear infinite;
              animation: anim 30s 3.5s linear infinite;
    }
    .circle:nth-child(8) {
      -webkit-animation: anim 30s 4s linear infinite;
              animation: anim 30s 4s linear infinite;
    }
    .circle:nth-child(9) {
      -webkit-animation: anim 30s 4.5s linear infinite;
              animation: anim 30s 4.5s linear infinite;
    }
    .circle:nth-child(10) {
      -webkit-animation: anim 30s 5s linear infinite;
              animation: anim 30s 5s linear infinite;
    }
    .circle:nth-child(11) {
      -webkit-animation: anim 30s 5.5s linear infinite;
              animation: anim 30s 5.5s linear infinite;
    }
    .circle:nth-child(12) {
      -webkit-animation: anim 30s 6s linear infinite;
              animation: anim 30s 6s linea.........完整代码请登录后点击上方下载按钮下载查看

网友评论0