div+css实现虫洞穿越穿梭动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现虫洞穿越穿梭动画效果代码

代码标签: div css 虫洞 穿越 穿梭 动画

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    body {
  background-color: #340468;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  perspective: 3.125vmin;
}

body::after {
  background-color: #340468;
  border-radius: 50%;
  box-shadow: 0 0 2.5vmin 2.5vmin #340468;
  content: "";
  height: 2.5vmin;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2.5vmin;
}

.polygon {
  -webkit-animation: 4s linear infinite polygon;
          animation: 4s linear infinite polygon;
  left: 50%;
  position: absolute;
  top: 50%;
  transform-style: preserve-3d;
  transform: rotatex(90deg) rotatey(0) translatey(-25vmin);
}

@-webkit-keyframes polygon {
  100% {
    transform: rotatex(90deg) rotatey(360deg) translatey(0);
  }
}

@keyframes polygon {
  100% {
    transform: rotatex(90deg) rotatey(360deg) translatey(0);
  }
}
.side {
  background-image: url(//repo.bfw.wiki/bfwrepo/image/631af46b72bdb.png);
  background-size: 159.12989vmin 25%;
  filter: hue-rotate(-10deg);
  height: 100vmin;
  position: absolute;
  transform-origin: 0;
  width: calc(9.94562vmin + 1px);
}
.side:nth-child(1) {
  background-position: -9.94562vmin 0;
  transform: rotatey(22.5deg) translate3d(-50%, -50%, 25vmin);
}
.side:nth-child(2) {
  background-position: -19.89124vmin 0;
  transform: rotatey(45deg) translate3d(-50%, -50%, 25vmin);
}
.side:nth-child(3) {
  background-position: -29.83686vmin 0;
  transform: rotatey(67.5deg) translate3d(-50%, -50%, 25vmin);
}
.side:nth-child(4) {
  background-position: -39.78247vmin 0;
  transform: rotatey(90deg) translate3d(-50%, -50%, 25vmin);
}
.side:nth-child(5) {
  background-position: -49.72809vmin 0;
  transform: rotatey(112.5deg) translate3d(-50%, -50%, 25vmin);
}
.side:nth-child(6) {
  background-position: -59.67371vmin 0;
  transform: rotatey(135deg) translate3d(-50%, -50%, 25vmin);
}
.side:nth-child(7) {
  background-position: -69.61933vmin 0;
  transform: rotatey(157.5deg) translate3d(-50%, -50%.........完整代码请登录后点击上方下载按钮下载查看

网友评论0