css实现三维木块翻转动画效果代码

代码语言:html

所属分类:三维

代码描述:css实现三维木块翻转动画效果代码

代码标签: 木块 翻转 动画 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
  
<style>
body {
  overflow: hidden;
  margin: 0;
  height: 100vh;
  perspective: 40em;
  background: #000;
}

.assembly {
  transform: rotateX(-30deg);
}
.assembly, .assembly * {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
}

.positioner:nth-child(1) {
  transform: rotateY(0deg) translateZ(10.15625em) rotateX(70deg);
}
.positioner:nth-child(1) .prism {
  animation-delay: 0s;
}
.positioner:nth-child(1) .prism__face {
  background: #542252;
}
.positioner:nth-child(1) .prism__face:nth-child(n + 5) {
  background: #6699ff;
}
.positioner:nth-child(2) {
  transform: rotateY(15deg) translateZ(10.15625em) rotateX(70deg);
}
.positioner:nth-child(2) .prism {
  animation-delay: -0.07292s;
}
.positioner:nth-child(2) .prism__face {
  background: #552251;
}
.positioner:nth-child(2) .prism__face:nth-child(n + 5) {
  background: #6698fc;
}
.positioner:nth-child(3) {
  transform: rotateY(30deg) translateZ(10.15625em) rotateX(70deg);
}
.positioner:nth-child(3) .prism {
  animation-delay: -0.14583s;
}
.positioner:nth-child(3) .prism__face {
  background: #57234e;
}
.positioner:nth-child(3) .prism__face:nth-child(n + 5) {
  background: #6894f3;
}
.positioner:nth-child(4) {
  transform: rotateY(45deg) translateZ(10.15625em) rotateX(70deg);
}
.positioner:nth-child(4) .prism {
  animation-delay: -0.21875s;
}
.positioner:nth-child(4) .prism__face {
  background: #5a244a;
}
.positioner:nth-child(4) .prism__face:nth-child(n + 5) {
  background: #6a8ee5;
}
.positioner:nth-child(5) {
  transform: rotateY(60deg) translateZ(10.15625em) rotateX(70deg);
}
.positioner:nth-child(5) .prism {
  animation-delay: -0.29167s;
}
.positioner:nth-child(5) .prism__face {
  background: #5f2644;
}
.positioner:nth-child(5) .prism__face:nth-child(n + 5) {
  background: #6c86d2;
}
.positioner:nth-child(6) {
  transform: rotateY(75deg) translateZ.........完整代码请登录后点击上方下载按钮下载查看

网友评论0