css实现立体大方块分裂成许多小方块动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现立体大方块分裂成许多小方块动画效果代码

代码标签: css立体 方块 分裂 动画

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
* {
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

body {
  background-image: radial-gradient(circle, #111, #000 800px);
  min-height: 100vh;
  display: grid;
  place-items: center;
  perspective: 1200px;
}
body *:not(:empty) {
  transform-style: preserve-3d;
}

.scene {
  position: absolute;
  font-size: 24px;
  -webkit-animation: sceneRotate 45s infinite linear;
          animation: sceneRotate 45s infinite linear;
}
@-webkit-keyframes sceneRotate {
  to {
    transform: rotateX(360deg) rotateY(1080deg);
  }
}
@keyframes sceneRotate {
  to {
    transform: rotateX(360deg) rotateY(1080deg);
  }
}

.cubes {
  -webkit-animation: cubesScale 10s infinite linear;
          animation: cubesScale 10s infinite linear;
}
@-webkit-keyframes cubesScale {
  from {
    transform: scale3d(1, 1, 1);
  }
  to {
    transform: scale3d(1.66666, 1.66666, 1.66666);
  }
}
@keyframes cubesScale {
  from {
    transform: scale3d(1, 1, 1);
  }
  to {
    transform: scale3d(1.66666, 1.66666, 1.66666);
  }
}

.cube, .mainCube {
  position: absolute;
  inset: calc(var(--hSize) * -1);
}

.cube {
  --hSize: 0.5em;
  --bgSize: 5em;
}
.cube:nth-child(1) {
  --x: -2;
  --y: -2;
  --z: -2;
}
.cube:nth-child(2) {
  --x: -2;
  --y: -2;
  --z: -1;
}
.cube:nth-child(3) {
  --x: -2;
  --y: -2;
  --z: 0;
}
.cube:nth-child(4) {
  --x: -2;
  --y: -2;
  --z: 1;
}
.cube:nth-child(5) {
  --x: -2;
  --y: -2;
  --z: 2;
}
.cube:nth-child(6) {
  --x: -2;
  --y: -1;
  --z: -2;
}
.cube:nth-child(7) {
  --x: -2;
  --y: -1;
  --z: -1;
}
.cube:nth-child(8) {
  --x: -2;
  --y: -1;
  --z: 0;
}
.cube:nth-child(9) {
  --x: -2;
  --y: -1;
  --z: 1;
}
.cube:nth-child(10) {
  --x: -2;
  --y: -1;
  --z: 2;
}
.cube:nth-child(11) {
  --x: -2;
  --y: 0;
  --z: -2;
}
.cube:nth-child(12) {
  --x: -2;
  --y: 0;
  --z: -1;
}
.cube:nth-child(13) {
  --x: -2;
  --y: 0;
  --z: 0;
}
.cube:nth-child(14) {
  --x: -2;
  --y: 0;
  --z: 1;
}
.cube:nth-child(15) {
  --x: -2;
  --y: 0;
  --z: 2;
}
.cube:nth-child(16) {
  --x: -2;
  --y: 1;
  --z: -2;
}
.cube:nth-child(17) {
  --x: -2;
  --y: 1;
  --z: -1;
}
.cube:nth-child(18) {
  --x: -2;
  --y: 1;
  --z: 0;
}
.cube:nth-child(19) {
  --x: -2;
  --y: 1;
  --z: 1;
}
.cube:nth-child(20) {
  --x: -2;
  --y: 1;
  --z: 2;
}
.cube:nth-child(21) {
  --x: -2;
  --y: 2;
  --z: -2;
}
.cube:nth-child(22) {
  --x: -2;
  --y: 2;
  --z: -1;
}
.cube:nth-child(23) {
  --x: -2;
  --y: 2;
  --z: 0;
}
.cube:nth-child(24) {
  --x: -2;
  --y: 2;
  --z: 1;
}
.cube:nth-child(25) {
  --x: -2;
  --y: 2;
  --z: 2;
}
.cube:nth-child(26) {
  --x: -1;
  --y: -2;
  --z: -2;
}
.cube:nth-child(27) {
  --x: -1;
  --y: -2;
  --z: -1;
}
.cube:nth-child(28) {
  --x: -1;
  --y: -2;
  --z: 0;
}
.cube:nth-child(29) {
  --x: -1;
  --y: -2;
  --z: 1;
}
.cube:nth-child(30) {
  --x: -1;
  --y: -2;
  --z: 2;
}
.cube:nth-child(31) {
  --x: -1;
  --y: -1;
  --z: -2;
}
.cube:nth-child(32) {
  --x: -1;
  --y: -1;
  --z: 2;
}
.cube:nth-child(33) {
  --x: -1;
  --y: 0;
  --z: -2;
}
.cube:nth-child(34) {
  --x: -1;
  --y: 0;
  --z: 2;
}
.cube:nth-child(35) {
  --x: -1;
  --y: 1;
  --z: -2;
}
.cube:nth-child(36) {
  --x: -1;
  --y: 1;
  --z: 2;
}
.cube:nth-child(37) {
  --x: -1;
  --y: 2;
  --z: -2;
}
.cube:nth-child(38) {
  --x: -1;
  --y: 2;
  --z: -1;
}
.cube:nth-child(39) {
  --x: -1;
  --y: 2;
  --z: 0;
}
.cube:nth-child(40) {
  --x: -1;
  --y: 2;
  --z: 1;
}
.cube:nth-child(41) {
  --x: -1;
  --y: 2;
  --z: 2;
}
.cube:nth-child(42) {
  --x: 0;
  --y: -2;
  --z: -2;
}
.cube:nth-child(43) {
  --x: 0;
  --y: -2;
  --z: -1;
}
.cube:nth-child(44) {
  --x: 0;
  --y: -2;
  --z: 0;
}
.cube:nth-child(45) {
  --x: 0;
  --y: -2;
  --z: 1;
}
.cube:nth-child(46) {
  --x: 0;
  --y: -2;
  --z: 2;
}
.cube:nth-child(47) {
  --x: 0;
  --y: -1;
  --z: -2;
}
.cube:nth-child(48) {
  --x: 0;
  --y: -1;
  --z: 2;
}
.cube:nth-child(49) {
  --x: 0;
  --y: 0;
  --z: -2;
}
.cube:nth-child(50) {
  --x: 0;
  --y: 0;
  --z: 2;
}
.cube:nth-child(51) {
  --x: 0;
  --y: 1;
  --z: -2;
}
.cube:nth-child(52) {
  --x: 0;
  --y: 1;
  --z: 2;
}
.cube:nth-child(53) {
  --x: 0;
  --y: 2;
  --z: -2;
}
.cube:nth-child(54) {
  --x: 0;
  --y: 2;
  --z: -1;
}
.cube:nth-child(55) {
  --x: 0;
  --y: 2;
  --z: 0;
}
.cube:nth-child(56) {
  --x: 0;
  --y: 2;
  --z: 1;
}
.cube:nth-child(57) {
  --x: 0;
  --y: 2;
  --z: 2;
}
.cube:nth-child(58) {
  --x: 1;
  --y: -2;
  --z: -2;
}
.cube:nth-child(59) {
  --x: 1;
  --y: -2;
  --z: -1;
}
.cube:nth-child(60) {
  --x: 1;
  --y: -2;
  --z: 0;
}
.cube:nth-child(61) {
  --x: 1;
  --y: -2;
  --z: 1;
}
.cube:nth-child(62) {
  --x: 1;
  --y: -2;
  --z: 2;
}
.cube:nth-child(63) {
  --x: 1;
  --y: -1;
  --z: -2;
}
.cube:nth-child(64) {
  --x: 1;
  --y: -1;
  --z: 2;
}
.cube:nth-child(65) {
  --x: 1;
  --y: 0;
  --z: -2;
}
.cube:nth-child(66) {
  --x: 1;
  --y: 0;
  --z: 2;
}
.cube:nth-child(67) {
  --x: 1;
  --y: 1;
  --z: -2;
}
.cube:nth-child(68) {
  --x: 1;
  --y: 1;
  --z: 2;
}
.cube:nth-child(69) {
  --x: 1;
  --y: 2;
  --z: -2;
}
.cube:nth-child(70) {
  --x: 1;
  --y: 2;
  --z: -1;
}
.cube:nth-child(71) {
  --x: 1;
  --y: 2;
  --z: 0;
}
.cube:nth-child(72) {
  --x: 1;
  --y: 2;
  --z: 1;
}
.cube:nth-child(73) {
  --x: 1;
  --y: 2;
  --z: 2;
}
.cube:nth-child(74) {
  --x: 2;
  --y: -2;
  --z: -2;
}
.cube:nth-child(75) {
  --x: 2;
  --y: -2;
  --z: -1;
}
.cube:nth-child(76) {
  --x: 2;
  --y: -2;
  --z: 0;
}
.cube:nth-child(77) {
  --x: 2;
  --y: -2;
  --z: 1;
}
.cube:nth-child(78) {
  --x: 2;
  --y: -2;
  --z: 2;
}
.cube:nth-child(79) {
  --x: 2;
  --y: -1;
  --z: -2;
}
.cube:nth-child(80) {
  --x: 2;
  --y: -1;
  --z: -1;
}
.cube:nth-child(81) {
  --x: 2;
  --y: -1;
  --z: 0;
}
.cube:nth-child(82) {
  --x: 2;
  --y: -1;
  --z: 1;
}
.cube:nth-child(83) {
  --x: 2;
  --y: -1;
  --z: 2;
}
.cube:nth-child(84) {
  --x: 2;
  --y: 0;
  --z: -2;
}
.cube:nth-child(85) {
  --x: 2;
  --y: 0;
  --z: -1;
}
.cube:nth-child(86) {
  --x: 2;
  --y: 0;
  --z: 0;
}
.cube:nth-child(87) {
  --x: 2;
  --y: 0;
  --z: 1;
}
.cube:nth-child(88) {
  --x: 2;
  --y: 0;
  --z: 2;
}
.cube:nth-child(89) {
  --x: 2;
  --y: 1;
  --z: -2;
}
.cube:nth-child(90) {
  --x: 2;
  --y: 1;
  --z: -1;
}
.cube:nth-child(91) {
  --x: 2;
  --y: 1;
  --z: 0;
}
.cube:nth-child(92) {
  --x: 2;
  --y: 1;
  --z: 1;
}
.cube:nth-child(93) {
  --x: 2;
  --y: 1;
  --z: 2;
}
.cube:nth-child(94) {
  --x: 2;
  --y: 2;
  --z: -2;
}
.cube:nth-child(95) {
  --x: 2;
  --y: 2;
  --z: -1;
}
.cube:nth-child(96) {
  --x: 2;
  --y: 2;
  --z: 0;
}
.cube:nth-child(97) {
  --x: 2;
  --y: 2;
  --z: 1;
}
.cube:nth-child(98) {
  --x: 2;
  --y: 2;
  --z: 2;
}
.cube:nth-child(1) {
  -webkit-animation: cubeTransform0 10s infinite ease-in;
          animation: cubeTransform0 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform0 {
  0%, 52.05% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  67.05% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  82.05%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform0 {
  0%, 52.05% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  67.05% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  82.05%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(2) {
  -webkit-animation: cubeTransform1 10s infinite ease-in;
          animation: cubeTransform1 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform1 {
  0%, 35.03% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  50.03% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  65.03%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform1 {
  0%, 35.03% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  50.03% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  65.03%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(3) {
  -webkit-animation: cubeTransform2 10s infinite ease-in;
          animation: cubeTransform2 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform2 {
  0%, 57.63% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  72.63% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  87.63%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform2 {
  0%, 57.63% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  72.63% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  87.63%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(4) {
  -webkit-animation: cubeTransform3 10s infinite ease-in;
          animation: cubeTransform3 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform3 {
  0%, 10.51% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  25.51% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  40.51%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform3 {
  0%, 10.51% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  25.51% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  40.51%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(5) {
  -webkit-animation: cubeTransform4 10s infinite ease-in;
          animation: cubeTransform4 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform4 {
  0%, 33.82% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  48.82% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  63.82%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform4 {
  0%, 33.82% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  48.82% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  63.82%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(6) {
  -webkit-animation: cubeTransform5 10s infinite ease-in;
          animation: cubeTransform5 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform5 {
  0%, 45.14% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  60.14% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  75.14%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform5 {
  0%, 45.14% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  60.14% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  75.14%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(7) {
  -webkit-animation: cubeTransform6 10s infinite ease-in;
          animation: cubeTransform6 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform6 {
  0%, 22.36% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  37.36% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  52.36%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform6 {
  0%, 22.36% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  37.36% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  52.36%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(8) {
  -webkit-animation: cubeTransform7 10s infinite ease-in;
          animation: cubeTransform7 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform7 {
  0%, 29.21% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  44.21% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  59.21%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform7 {
  0%, 29.21% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  44.21% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  59.21%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(9) {
  -webkit-animation: cubeTransform8 10s infinite ease-in;
          animation: cubeTransform8 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform8 {
  0%, 4.45% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  19.45% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  34.45%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform8 {
  0%, 4.45% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  19.45% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  34.45%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(10) {
  -webkit-animation: cubeTransform9 10s infinite ease-in;
          animation: cubeTransform9 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform9 {
  0%, 20.98% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  35.98% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  50.98%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform9 {
  0%, 20.98% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  35.98% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  50.98%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(11) {
  -webkit-animation: cubeTransform10 10s infinite ease-in;
          animation: cubeTransform10 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform10 {
  0%, 57.99% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  72.99% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  87.99%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform10 {
  0%, 57.99% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  72.99% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  87.99%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(12) {
  -webkit-animation: cubeTransform11 10s infinite ease-in;
          animation: cubeTransform11 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform11 {
  0%, 6.66% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  21.66% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  36.66%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform11 {
  0%, 6.66% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  21.66% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  36.66%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(13) {
  -webkit-animation: cubeTransform12 10s infinite ease-in;
          animation: cubeTransform12 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform12 {
  0%, 8.83% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  23.83% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  38.83%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform12 {
  0%, 8.83% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  23.83% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  38.83%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
.cube:nth-child(14) {
  -webkit-animation: cubeTransform13 10s infinite ease-in;
          animation: cubeTransform13 10s infinite ease-in;
}
@-webkit-keyframes cubeTransform13 {
  0%, 3.7% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  18.7% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  33.7%, 100% {
    transform: translate3d(calc(var(--x) * 3em), calc(var(--y) * 3em), calc(var(--z) * 3em)) scale3d(0, 0, 0);
  }
}
@keyframes cubeTransform13 {
  0%, 3.7% {
    transform: translate3d(calc(var(--x) * 1em), calc(var(--y) * 1em), calc(var(--z) * 1em)) scale3d(1, 1, 1);
  }
  18.7% {
    transform: translate3d(calc(var(--x) * 2em), calc(var(--y) * 2em), calc(var(--z) * 2em)) scale3d(1, 1, 1);
    -webkit-animation-timing-function: ease-out;
            anim.........完整代码请登录后点击上方下载按钮下载查看

网友评论0