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;
}
bod.........完整代码请登录后点击上方下载按钮下载查看

网友评论0