css实现多米诺骨牌动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现多米诺骨牌动画效果代码

代码标签: 动画 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap");
*, *::before, *::after {
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

body {
  font-family: "Indie Flower", cursive;
  background-color: #333;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  position: relative;
  width: 900px;
  height: 600px;
  border: 2px solid #fff;
  background-image: linear-gradient(#456, #333 75%, #444 75%, #222);
  perspective: 400px;
  overflow: hidden;
}
.container h1 {
  font-size: 60px;
  font-weight: normal;
  text-align: center;
  padding: 2em 0.5em;
  line-height: 0.75;
}

.floor {
  position: absolute;
  bottom: 0px;
  width: 200px;
  height: 400px;
  background-color: #0003;
  transform: rotateX(90deg);
  transform-origin: bottom;
  -webkit-animation: floors 16s infinite linear;
          animation: floors 16s infinite linear;
}
.floor:nth-child(1) {
  -webkit-animation-delay: -2.31s;
          animation-delay: -2.31s;
}
.floor:nth-child(2) {
  -webkit-animation-delay: -4.31s;
          animation-delay: -4.31s;
}
.floor:nth-child(3) {
  -webkit-animation-delay: -6.31s;
          animation-delay: -6.31s;
}
.floor:nth-c.........完整代码请登录后点击上方下载按钮下载查看

网友评论0