css实现星际旅行穿越宇宙繁星飞船视角动画代码

代码语言:html

所属分类:动画

代码描述:css实现星际旅行穿越宇宙繁星飞船视角动画代码

代码标签: 旅行 穿越 宇宙 繁星 飞船 视角 动画

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #000;
  text-align: center;
}
body::before {
  content: "";
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.scene {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  perspective: 15px;
  perspective-origin: 50% 50%;
}

.wrap {
  position: absolute;
  width: 1000px;
  height: 1000px;
  left: -500px;
  top: -500px;
  transform-style: preserve-3d;
  animation: move 12s infinite linear;
  animation-fill-mode: forwards;
}

.wrap:nth-child(2) {
  animation: move 12s infinite linear;
  animation-delay: 6s;
}

.wall {
  width: 100%;
  height: 100%;
  position: absolute;
  background: url(//repo.bfw.wiki/bfwrepo/image/5fb05c5c80323.png);
  background-size: cover;
  opacity: 0;
  animation: fade 12s infinite linear;
}

.wrap:nth-child(2) .wall {
  animation-delay: 6s;
}

.wall-right {
  transform: rotateY(90deg) translateZ(500px);
}

.wall-left {
  transform: rotateY(-90deg) translateZ(500px);
}

.wall-top {
  transform: rotateX(90deg) translateZ(500px);
}.........完整代码请登录后点击上方下载按钮下载查看

网友评论0