CSS3实现3D木块旋转动画js代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 CSS3实现3D木块旋转动画js代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

CSS3实现3D木块旋转动画js代码

HTML代码(index.html):

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>CSS3实现3D木块旋转动画</title>
    <style>
/* VARIABLES */
/*Should be the same as markup*/
.container {
  position: relative;
  top: 100px;
  margin: 0 auto;
  width: 300px;
  perspective: 400px;
  transform-style: preserve-3d;
  /*animation: camera 3s infinite alternate;*/
}

.cuboid {
  position: relative;
  height: 20px;
  width: 200px;
  padding-bottom: 10px;
  transform-style: preserve-3d;
  animation-name: spin;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
  /* Cycle through cuboids, adding the staggers */
}
.cuboid:nth-child(1) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.9s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(1) div:nth-child(1) {
  animation-delay: -3.4s;
}
.cuboid:nth-child(1) div:nth-child(2) {
  animation-delay: -2.9s;
}
.cuboid:nth-child(1) div:nth-child(3) {
  animation-delay: -2.4s;
}
.cuboid:nth-child(1) div:nth-child(4) {
  animation-delay: -1.9s;
}
.cuboid:nth-child(2) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.8s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(2) div:nth-child(1) {
  animation-delay: -3.3s;
}
.cuboid:nth-child(2) div:nth-child(2) {
  animation-delay: -2.8s;
}
.cuboid:nth-child(2) div:nth-child(3) {
  animation-delay: -2.3s;
}
.cuboid:nth-child(2) div:nth-child(4) {
  animation-delay: -1.8s;
}
.cuboid:nth-child(3) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.7s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(3) div:nth-child(1) {
  animation-delay: -3.2s;
}
.cuboid:nth-child(3) div:nth-child(2) {
  animation-delay: -2.7s;
}
.cuboid:nth-child(3) div:nth-child(3) {
  animation-delay: -2.2s;
}
.cuboid:nth-child(3) div:nth-child(4) {
  animation-delay: -1.7s;
}
.cuboid:nth-child(4) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.6s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(4) div:nth-child(1) {
  animation-delay: -3.1s;
}
.cuboid:nth-child(4) div:nth-child(2) {
  animation-delay: -2.6s;
}
.cuboid:nth-child(4) div:nth-child(3) {
  animation-delay: -2.1s;
}
.cuboid:nth-child(4) div:nth-child(4) {
  animation-delay: -1.6s;
}
.cuboid:nth-child(5) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.5s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(5) div:nth-child(1) {
  animation-delay: -3s;
}
.cuboid:nth-child(5) div:nth-child(2) {
  animation-delay: -2.5s;
}
.cuboid:nth-child(5) div:nth-child(3) {
  animation-delay: -2s;
}
.cuboid:nth-child(5) div:nth-child(4) {
  animation-delay: -1.5s;
}
.cuboid:nth-child(6) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.4s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(6) div:nth-child(1) {
  animation-delay: -2.9s;
}
.cuboid:nth-child(6) div:nth-child(2) {
  animation-delay: -2.4s;
}
.cuboid:nth-child(6) div:nth-child(3) {
  animation-delay: -1.9s;
}
.cuboid:nth-child(6) div:nth-child(4) {
  animation-delay: -1.4s;
}
.cuboid:nth-child(7) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.3s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(7) div:nth-child(1) {
  animation-delay: -2.8s;
}
.cuboid:nth-child(7) div:nth-child(2) {
  animation-delay: -2.3s;
}
.cuboid:nth-child(7) div:nth-child(3) {
  animation-delay: -1.8s;
}
.cuboid:nth-child(7) div:nth-child(4) {
  animation-delay: -1.3s;
}
.cuboid:nth-child(8) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.2s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(8) div:nth-child(1) {
  animation-delay: -2.7s;
}
.cuboid:nth-child(8) div:nth-child(2) {
  animation-delay: -2.2s;
}
.cuboid:nth-child(8) div:nth-child(3) {
  animation-delay: -1.7s;
}
.cuboid:nth-child(8) div:nth-child(4) {
  animation-delay: -1.2s;
}
.cuboid:nth-child(9) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1.1s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(9) div:nth-child(1) {
  animation-delay: -2.6s;
}
.cuboid:nth-child(9) div:nth-child(2) {
  animation-delay: -2.1s;
}
.cuboid:nth-child(9) div:nth-child(3) {
  animation-delay: -1.6s;
}
.cuboid:nth-child(9) div:nth-child(4) {
  animation-delay: -1.1s;
}
.cuboid:nth-child(10) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -1s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(10) div:nth-child(1) {
  animation-delay: -2.5s;
}
.cuboid:nth-child(10) div:nth-child(2) {
  animation-delay: -2s;
}
.cuboid:nth-child(10) div:nth-child(3) {
  animation-delay: -1.5s;
}
.cuboid:nth-child(10) div:nth-child(4) {
  animation-delay: -1s;
}
.cuboid:nth-child(11) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -0.9s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(11) div:nth-child(1) {
  animation-delay: -2.4s;
}
.cuboid:nth-child(11) div:nth-child(2) {
  animation-delay: -1.9s;
}
.cuboid:nth-child(11) div:nth-child(3) {
  animation-delay: -1.4s;
}
.cuboid:nth-child(11) div:nth-child(4) {
  animation-delay: -0.9s;
}
.cuboid:nth-child(12) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -0.8s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(12) div:nth-child(1) {
  animation-delay: -2.3s;
}
.cuboid:nth-child(12) div:nth-child(2) {
  animation-delay: -1.8s;
}
.cuboid:nth-child(12) div:nth-child(3) {
  animation-delay: -1.3s;
}
.cuboid:nth-child(12) div:nth-child(4) {
  animation-delay: -0.8s;
}
.cuboid:nth-child(13) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -0.7s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(13) div:nth-child(1) {
  animation-delay: -2.2s;
}
.cuboid:nth-child(13) div:nth-child(2) {
  animation-delay: -1.7s;
}
.cuboid:nth-child(13) div:nth-child(3) {
  animation-delay: -1.2s;
}
.cuboid:nth-child(13) div:nth-child(4) {
  animation-delay: -0.7s;
}
.cuboid:nth-child(14) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -0.6s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(14) div:nth-child(1) {
  animation-delay: -2.1s;
}
.cuboid:nth-child(14) div:nth-child(2) {
  animation-delay: -1.6s;
}
.cuboid:nth-child(14) div:nth-child(3) {
  animation-delay: -1.1s;
}
.cuboid:nth-child(14) div:nth-child(4) {
  animation-delay: -0.6s;
}
.cuboid:nth-child(15) {
  /* Note the '- $duration' after the animation-delays
   * This prevents planks being stationary at start
   */
  animation-delay: -0.5s;
  /* Cycle through faces adding color delays */
}
.cuboid:nth-child(15) div:nth-child(1) {
  animation-delay: -2s;
}
.cuboid:nth-child(15) div:nth-child(2) {
  animation-delay: -1.5s;
}
.cuboid:nth-child(15) div:nth-child(3) {
  animation-delay: -1s;
}
.cuboid:nth-child(15) div:nth-child(4) {
  animation-delay: -0.5s;
}
.cuboid div {
  position: absolute;
  background-color: #8a5b0f;
  backface-visibility: hidden;
  /* Improves stability */
}
.cuboid .front,
.cuboid .left,
.cuboid .back,
.cuboid .right {
  animation: color 1s infinite linear alternate;
}
.cuboid .front,
.cuboid .back {
  height: 20px;
  width: 200px;
}
.cuboid .bottom,
.cuboid .top {
  height: 20px;
  width: 200px;
}
.cuboid .left,
.cuboid .right {
  height: 20px;
  width: 20px;
}
.cuboid .front {
  transform: translateZ(10px);
}
.cuboid .back {
  transform: rotateY(180deg) translateZ(10px);
}
.cuboid .top {
  transform: rotateX(90deg) translateZ(10px);
  background-color: #f0c175;
}
.cuboid .bottom {
  transform: rotateX(-90deg) translateZ(10px);
}
.cuboid .left {
  transform: rotateY(-90deg) translateZ(10px);
}
.cuboid .right {
  transform: rotateY(90deg) translateZ(190px);
}

@keyframes spin {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}
@keyframes color {
  from {
    background-color: #f0c175;
  }

  to {
    background-color: #8a5b0f;
  }
}
@keyframes camera {
  from {
    transform: rotateX(-40deg);
  }

  to {
    transform: rotateY(40deg);
  }
}

</style>

    <script src="js/prefixfree.min.js"></script>

</head>

<body>
  <div class='container'>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
  <div class='cuboid'>
    <div class='front'></div>
    <div class='left'></div>
    <div class='back'></div>
    <div class='right'></div>
    <div class='top'></div>
    <div class='bottom'></div>
  </div>
</div>
</body>
</html>

CSS代码(style.css):

/* VARIABLES */
/*Should be the same as markup*/
.container{position:relative;top:100px;margin:0 auto;width:300px;perspective:400px;transform-style:preserve-3d;/*animation:camera 3s infinite alternate;*/
}
.cuboid{position:relative;height:20px;width:200px;padding-bottom:10px;transform-style:preserve-3d;animation-name:spin;animation-duration:2s;animation-iteration-count:infinite;animation-timing-function:linear;/* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
 /* Cycle through cuboids,adding the staggers */
}
.cuboid:nth-child(1){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.9s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(1) div:nth-child(1){animation-delay:-3.4s;}
.cuboid:nth-child(1) div:nth-child(2){animation-delay:-2.9s;}
.cuboid:nth-child(1) div:nth-child(3){animation-delay:-2.4s;}
.cuboid:nth-child(1) div:nth-child(4){animation-delay:-1.9s;}
.cuboid:nth-child(2){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.8s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(2) div:nth-child(1){animation-delay:-3.3s;}
.cuboid:nth-child(2) div:nth-child(2){animation-delay:-2.8s;}
.cuboid:nth-child(2) div:nth-child(3){animation-delay:-2.3s;}
.cuboid:nth-child(2) div:nth-child(4){animation-delay:-1.8s;}
.cuboid:nth-child(3){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.7s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(3) div:nth-child(1){animation-delay:-3.2s;}
.cuboid:nth-child(3) div:nth-child(2){animation-delay:-2.7s;}
.cuboid:nth-child(3) div:nth-child(3){animation-delay:-2.2s;}
.cuboid:nth-child(3) div:nth-child(4){animation-delay:-1.7s;}
.cuboid:nth-child(4){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.6s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(4) div:nth-child(1){animation-delay:-3.1s;}
.cuboid:nth-child(4) div:nth-child(2){animation-delay:-2.6s;}
.cuboid:nth-child(4) div:nth-child(3){animation-delay:-2.1s;}
.cuboid:nth-child(4) div:nth-child(4){animation-delay:-1.6s;}
.cuboid:nth-child(5){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.5s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(5) div:nth-child(1){animation-delay:-3s;}
.cuboid:nth-child(5) div:nth-child(2){animation-delay:-2.5s;}
.cuboid:nth-child(5) div:nth-child(3){animation-delay:-2s;}
.cuboid:nth-child(5) div:nth-child(4){animation-delay:-1.5s;}
.cuboid:nth-child(6){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.4s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(6) div:nth-child(1){animation-delay:-2.9s;}
.cuboid:nth-child(6) div:nth-child(2){animation-delay:-2.4s;}
.cuboid:nth-child(6) div:nth-child(3){animation-delay:-1.9s;}
.cuboid:nth-child(6) div:nth-child(4){animation-delay:-1.4s;}
.cuboid:nth-child(7){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.3s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(7) div:nth-child(1){animation-delay:-2.8s;}
.cuboid:nth-child(7) div:nth-child(2){animation-delay:-2.3s;}
.cuboid:nth-child(7) div:nth-child(3){animation-delay:-1.8s;}
.cuboid:nth-child(7) div:nth-child(4){animation-delay:-1.3s;}
.cuboid:nth-child(8){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.2s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(8) div:nth-child(1){animation-delay:-2.7s;}
.cuboid:nth-child(8) div:nth-child(2){animation-delay:-2.2s;}
.cuboid:nth-child(8) div:nth-child(3){animation-delay:-1.7s;}
.cuboid:nth-child(8) div:nth-child(4){animation-delay:-1.2s;}
.cuboid:nth-child(9){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1.1s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(9) div:nth-child(1){animation-delay:-2.6s;}
.cuboid:nth-child(9) div:nth-child(2){animation-delay:-2.1s;}
.cuboid:nth-child(9) div:nth-child(3){animation-delay:-1.6s;}
.cuboid:nth-child(9) div:nth-child(4){animation-delay:-1.1s;}
.cuboid:nth-child(10){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-1s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(10) div:nth-child(1){animation-delay:-2.5s;}
.cuboid:nth-child(10) div:nth-child(2){animation-delay:-2s;}
.cuboid:nth-child(10) div:nth-child(3){animation-delay:-1.5s;}
.cuboid:nth-child(10) div:nth-child(4){animation-delay:-1s;}
.cuboid:nth-child(11){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-0.9s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(11) div:nth-child(1){animation-delay:-2.4s;}
.cuboid:nth-child(11) div:nth-child(2){animation-delay:-1.9s;}
.cuboid:nth-child(11) div:nth-child(3){animation-delay:-1.4s;}
.cuboid:nth-child(11) div:nth-child(4){animation-delay:-0.9s;}
.cuboid:nth-child(12){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-0.8s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(12) div:nth-child(1){animation-delay:-2.3s;}
.cuboid:nth-child(12) div:nth-child(2){animation-delay:-1.8s;}
.cuboid:nth-child(12) div:nth-child(3){animation-delay:-1.3s;}
.cuboid:nth-child(12) div:nth-child(4){animation-delay:-0.8s;}
.cuboid:nth-child(13){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-0.7s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(13) div:nth-child(1){animation-delay:-2.2s;}
.cuboid:nth-child(13) div:nth-child(2){animation-delay:-1.7s;}
.cuboid:nth-child(13) div:nth-child(3){animation-delay:-1.2s;}
.cuboid:nth-child(13) div:nth-child(4){animation-delay:-0.7s;}
.cuboid:nth-child(14){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-0.6s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(14) div:nth-child(1){animation-delay:-2.1s;}
.cuboid:nth-child(14) div:nth-child(2){animation-delay:-1.6s;}
.cuboid:nth-child(14) div:nth-child(3){animation-delay:-1.1s;}
.cuboid:nth-child(14) div:nth-child(4){animation-delay:-0.6s;}
.cuboid:nth-child(15){/* Note the '- $duration' after the animation-delays * This prevents planks being stationary at start */
 animation-delay:-0.5s;/* Cycle through faces adding color delays */
}
.cuboid:nth-child(15) div:nth-child(1){animation-delay:-2s;}
.cuboid:nth-child(15) div:nth-child(2){animation-delay:-1.5s;}
.cuboid:nth-child(15) div:nth-child(3){animation-delay:-1s;}
.cuboid:nth-child(15) div:nth-child(4){animation-delay:-0.5s;}
.cuboid div{position:absolute;background-color:#8a5b0f;backface-visibility:hidden;/* Improves stability */
}
.cuboid .front,.cuboid .left,.cuboid .back,.cuboid .right{animation:color 1s infinite linear alternate;}
.cuboid .front,.cuboid .back{height:20px;width:200px;}
.cuboid .bottom,.cuboid .top{height:20px;width:200px;}
.cuboid .left,.cuboid .right{height:20px;width:20px;}
.cuboid .front{transform:translateZ(10px);}
.cuboid .back{transform:rotateY(180deg) translateZ(10px);}
.cuboid .top{transform:rotateX(90deg) translateZ(10px);background-color:#f0c175;}
.cuboid .bottom{transform:rotateX(-90deg) translateZ(10px);}
.cuboid .left{transform:rotateY(-90deg) translateZ(10px);}
.cuboid .right{transform:rotateY(90deg) translateZ(190px);}
@keyframes spin{from{transform:rotateY(0deg);}
to{transform:rotateY(360deg);}
}
@keyframes color{from{background-color:#f0c175;}
to{background-color:#8a5b0f;}
}
@keyframes camera{from{transform:rotateX(-40deg);}
to{transform:rotateY(40deg);}
}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
5.34 KB
html5特效
最新结算
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
HTML5实现CSS滤镜图片切换特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery+css3实现信封效果
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章