div+css实现文字剪纸拆分合并动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现文字剪纸拆分合并动画效果代码

代码标签: div css 文字 剪纸 拆分 合并 动画

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    body {
  background: #1e2832;
  height: 100vh;
  overflow: hidden;
  display: flex;
  font-family: "Anton", sans-serif;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 10rem;
}

.donuts_mask {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 500px;
  height: 500px;
  position: absolute;
  transform-origin: 5% 60%;
  transform: translate(-50%, -50%);
}
.donuts_mask::before {
  content: "";
  position: absolute;
  height: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 100%;
  background: #1e2832;
}
.donuts_mask:nth-child(1) {
  z-index: 10;
  -webkit-clip-path: circle(5%);
          clip-path: circle(5%);
  -webkit-animation: rotate 5000ms 150ms ease-in-out infinite;
          animation: rotate 5000ms 150ms ease-in-out infinite;
}
.donuts_mask:nth-child(1)::before {
  width: 0%;
  padding-top: 0%;
}
.donuts_mask:nth-child(2) {
  z-index: 9;
  -webkit-clip-path: circle(10%);
          clip-path: circle(10%);
  -webkit-animation: rotate 5000ms 300ms ease-in-out infinite;
          animation: rotate 5000ms 300ms ease-in-out infinite;
}
.donuts_mask:nth-child(2)::before {
  width: 10%;
  padding-top: 10%;
}
.donuts_mask:nth-child(3) {
  z-index: 8;
  -webkit-clip-path: circle(15%);
          clip-path: circle(15%);
  -webkit-animation: rotate 5000ms 450ms ease-in-out infinite;
          animation: rotate 5000ms 450ms ease-in-out infinite;
}
.donuts_mask:nth-child(3)::before {
  width: 20%;
  padding-top: 20%;
}
.donuts_mask:nth-child(4) {
  z-index: 7;
  -webkit-clip-path: circle(20%);
          clip-path: circle(20%);
  -webkit-animation: rotate 5000ms 600ms ease-in-out infinite;
          animation: rotate 5000ms 600ms ease-in-out infinite;
}
.donuts_mask:nth-child(4)::before {
  width: 30%;
  padding-top: 30%;
}
.donuts_mask:nth-child(5) {
  z-index: 6;
  -webkit-clip-path: circle(25%);
          clip-path: circle(25%);
  -webkit-animation: rotate 5000ms 750ms ease-in-out infinite;
          animation: rotate 5000ms 750ms ease-in-out infinite;
}
.donuts_mask:nth-child(5)::before {
  width: 40%;
  padding-top: 40%;
}
.donuts_mask:nth-child(6) {
  z-index: 5;
  -webkit-clip-path: circle(30%);
          clip-path: circle(30%);
  -webkit-animation: rotate 5000ms 900ms ease-in-out infinite;
          animation: rotate 5000ms 900ms ease-in-out infinite;
}
.donuts_mask:nth-child(6)::before {
  width: 50%;
  padding-top: 50%;
}
.donuts_mask:nth-child(.........完整代码请登录后点击上方下载按钮下载查看

网友评论0