jquery+css实现城市大楼拔地而起建筑开发城市化动画效果代码

代码语言:html

所属分类:动画

代码描述:jquery+css实现城市大楼拔地而起建筑开发城市化动画效果代码

代码标签: jquery css 城市 大楼 拔地 而起 建筑 开发 城市化 动画

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

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

<head>
    <meta charset="UTF-8">
<style>
    body {
  display: flex;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  --height: 20px;
  --color1: #fff;
  --color2:#fff;
  --delay:0s;
  perspective: 2000px;
}
body * {
  transform-style: preserve-3d;
}
body *:before, body *:after {
  transform-style: preserve-3d;
}
body .wrap {
  width: 600px;
  min-width: 600px;
  height: 600px;
  position: relative;
  transform: translateY(75px) translateX(-25px) rotateX(75deg);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}
body .wrap .grid {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  display: grid;
  grid-template-columns: repeat(8, 10%);
  grid-template-rows: repeat(8, 10%);
  transform: rotate(-135deg);
  box-shadow: 0 0 0 100vw #fff, inset 0 0 0 100vw #fff;
}
body .wrap .grid:before {
  content: "";
  position: absolute;
  width: 100vw;
  height: 50vw;
  background: #fff;
  top: 100%;
  right: 0;
  transform-origin: top;
  transform: rotateX(90.005deg);
  display: none;
}
body .wrap .grid.slide .cell {
  transform: translateZ(0) !important;
  transition-delay: 0s;
  background: #fff;
  box-shadow: inset 0 0 0 1px #fff;
}
body .wrap .grid .cell {
  box-shadow: inherit;
  transform: scale(0.75) translateY(calc(-100% - var(--shift))) translateX(calc(-100% + var(--shift))) translateZ(var(--height));
  background: #f1f1f1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  transition: 0.6s ease-in-out;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  grid-row-end: span var(--size);
  grid-column-end: span var(--size);
  will-change: transform;
  min-height: 75px;
}
body .wrap .grid .cell:nth-of-type(1) {
  transition-delay: 0.0166666667s;
}
body .wrap .grid .cell:nth-of-type(2) {
  transition-delay: 0.0333333333s;
}
body .wrap .grid .cell:nth-of-type(3) {
  transition-delay: 0.05s;
}
body .wrap .grid .cell:nth-of-type(4) {
  transition-delay: 0.0666666667s;
}
body .wrap .grid .cell:nth-of-type(5) {
  transition-delay: 0.0833333333s;
}
body .wrap .grid .cell:nth-of-type(6) {
  transition-delay: 0.1s;
}
body .wrap .grid .cell:nth-of-type(7) {
  transition-delay: 0.1166666667s;
}
body .wrap .grid .cell:nth-of-type(8) {
  transition-delay: 0.1333333333s;
}
body .wrap .grid .cell:nth-of-type(9) {
  transition-delay: 0.15s;
}
body .wrap .grid .cell:nth-of-type(10) {
  transition-delay: 0.1666666667s;
}
body .wrap .grid .cell:nth-of-type(11) {
  transition-delay: 0.1833333333s;
}
body .wrap .grid .cell:nth-of-type(12) {
  transition-delay: 0.2s;
}
body .wrap .grid .cell:nth-of-type(13) {
  transition-delay: 0.2166666667s;
}
body .wrap .grid .cell:nth-of-type(14) {
  transition-delay: 0.2333333333s;
}
body .wrap .grid .cell:nth-of-type(15) {
  transition-delay: 0.25s;
}
body .wrap .grid .cell:nth-of-type(16) {
  transition-delay: 0.2666666667s;
}
body .wrap .grid .cell:nth-of-type(17) {
  transition-delay: 0.2833333333s;
}
body .wrap .grid .cell:nth-of-type(18) {
  transition-delay: 0.3s;
}
body .wrap .grid .cell:nth-of-type(19) {
  transition-delay: 0.3166666667s;
}
body .wrap .grid .cell:nth-of-type(20) {
  transition-delay: 0.3333333333s;
}
body .wrap .grid .cell:nth-of-type(21) {
  transition-delay: 0.35s;
}
body .wrap .grid .cell:nth-of-type(22) {
  transition-delay: 0.3666666667s;
}
body .wrap .grid .cell:nth-of-type(23) {
  transition-delay: 0.3833333333s;
}
body .wrap .grid .cell:nth-of-type(24) {
  transition-delay: 0.4s;
}
body .wrap .grid .cell:nth-of-type(25) {
  transition-delay: 0.4166666667s;
}
body .wrap .grid .cell:nth-of-type(26) {
  transition-delay: 0.4333333333s;
}
body .wrap .grid .cell:nth-of-type(27) {
  transition-delay: 0.45s;
}
body .wrap .grid .cell:nth-of-type(28) {
  transition-delay: 0.4666666667s;
}
body .wrap .grid .cell:nth-of-type(29) {
  transition-delay: 0.4833333333s;
}
body .wrap .grid .cell:nth-of-type(30) {
  transition-delay: 0.5s;
}
body .wrap .grid .cell:nth-of-type(31) {
  transition-delay: 0.5166666667s;
}
body .wrap .grid .cell:nth-of-type(32) {
  transition-delay: 0.5333333333s;
}
body .wrap .grid .cell:nth-of-type(33) {
  transition-delay: 0.55s;
}
body .wrap .grid .cell:nth-of-type(34) {
  transition-delay: 0.5666666667s;
}
body .wrap .grid .cell:nth-of-type(35) {
  transition-delay: 0.5833333333s;
}
body .wrap .grid .cell:nth-of-type(36) {
  transition-delay: 0.6s;
}
body .wrap .grid .cell:nth-of-type(37) {
  transition-delay: 0.6166666667s;
}
body .wrap .grid .cell:nth-of-type(38) {
  transition-delay: 0.6333333333s;
}
body .wrap .grid .cell:nth-of-type(39) {
  transition-delay: 0.65s;
}
body .wrap .grid .cell:nth-of-type(40) {
  transition-delay: 0.6666666667s;
}
body .wrap .grid .cell:nth-of-type(41) {
  transition-delay: 0.6833333333s;
}
body .wrap .grid .cell:nth-of-type(42) {
  transition-delay: 0.7s;
}
body .wrap .grid .cell:nth-of-type(43) {
  transition-delay: 0.7166666667s;
}
body .wrap .grid .cell:nth-of-type(44) {
  transition-delay: 0.7333333333s;
}
body .wrap .grid .cell:nth-of-type(45) {
  transition-delay: 0.75s;
}
body .wrap .grid .cell:nth-of-type(46) {
  transition-delay: 0.7666666667s;
}
body .wrap .grid .cell:nth-of-type(47) {
  transition-delay: 0.7833333333s;
}
body .wrap .grid .cell:nth-of-type(48) {
  transition-delay: 0.8s;
}
body .wrap .grid .cell:nth-of-type(49) {
  transition-delay: 0.8166666667s;
}
body .wrap .grid .cell:nth-of-type(50) {
  transition-delay: 0.8333333333s;
}
body .wrap .grid .cell:nth-of-type(51) {
  transition-delay: 0.85s;
}
body .wrap .grid .cell:nth-of-type(52) {
  transition-delay: 0.8666666667s;
}
body .wrap .grid .cell:nth-of-type(53) {
  transition-delay: 0.8833333333s;
}
body .wrap .grid .cell:nth-of-type(54) {
  transition-delay: 0.9s;
}
body .wrap .grid .cell:nth-of-type(55) {
  transition-delay: 0.9166666667s;
}
body .wrap .grid .cell:nth-of-type(56) {
  transition-delay: 0.9333333333s;
}
body .wrap .grid .cell:nth-of-type(57) {
  transition-delay: 0.95s;
}
body .wrap .grid .cell:nth-of-type(58) {
  transition-delay: 0.9666666667s;
}
body .wrap .grid .cell:nth-of-type(59) {
  transition-delay: 0.9833333333s;
}
body .wrap .grid .cell:nth-of-type(60) {
  transition-delay: 1s;
}
body .wrap .grid .cell:nth-of-type(61) {
  transition-delay: 1.0166666667s;
}
body .wrap .grid .cell:nth-of-type(62) {
  transition-delay: 1.0333333333s;
}
body .wrap .grid .cell:nth-of-type(63) {
  transition-delay: 1.05s;
}
body .wrap .grid .cell:nth-of-type(64) {
  transition-delay: 1.0666666667s;
}
body .wrap .grid .cell.class11 {
  transform: scale(0.75) translateY(calc(-100% - var(--shift))) translateX(calc(-100% + var(--shift))) translateZ(calc(var(--height) * 2));
}
body .wrap .grid .cell.class11:before {
  height: calc(var(--height) * 2);
}
body .wrap .grid .cell.class11:after {
  width: calc(var(--height) * 2);
  left: calc(var(--height) * -2);
}
body .wrap .grid .cell.class1:before, body .wrap .grid .cell.class4:before, body .wrap .grid .cell.class8:before {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), inset 0 0 0 15px #efefef;
  background: repeating-linear-gradient(to bottom, #efefef, #efefef 5px, rgba(255, 255, 255, 0.0001) 5px, rgba(255, 255, 255, 0.0001) 15px, #efefef 15px, #efefef 20px), repeating-linear-gradient(to right, #efefef, #efefef 5px, rgba(255, 255, 255, 0.0001) 5px, rgba(255, 255, 255, 0.0001) 15px, #efefef 15px, #efefef 20px), #ccc;
  background-position: 50% 10px;
}
body .wrap .grid .cell.class1:after, body .wrap .grid .cell.class4:after, body .wrap .grid .cell.class8:after {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), inset 0 0 0 15px #fff;
  background: repeating-linear-gradient(to bottom, #fff, #fff 5px, rgba(255, 255, 255, 0.0001) 5px, rgba(255, 255, 255, 0.0001) 15px, #fff 15px, #fff 20px), repeating-linear-gradient(to left, #fff, #fff 5px, rgba(255, 255, 255, 0.0001) 5px, rgba(255, 255, 255, 0.0001) 15px, #fff 15px, #fff 20px), #cecece;
  background-position: 20px 50%;
}
body .wrap .grid .cell.class2:before, body .wrap .grid .cell.class5:before, body .wrap .grid .cell.class7:before {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), inset 0 0 0 15px #efefef;
  background: repeating-linear-gradient(to bottom, #efefef, #efefef 2px, rgba(255, 255, 255, 0.0001) 2px, rgba(255, 255.........完整代码请登录后点击上方下载按钮下载查看

网友评论0