div+css实现太空宇宙中马路行驶穿越动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现太空宇宙中马路行驶穿越动画效果代码

代码标签: div css 太空 宇宙 马路 行驶 穿越 动画

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

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

<head>
  <meta charset="UTF-8">
  

  
  
<style>
:root {
  --color00: #000007;
  --color16: #161616;
  --yellow: yellow;
  --white: white;
}
body {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color00);
  overflow: hidden;
  perspective: 200px;
  perspective-origin: center 60%;
  transform-style: preserve-3d;
}
@property --road {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --hue {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@property --float {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -0%;
}
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  perspective: 800px;
}
.star-layer,
.star-layer:before {
  position: absolute;
  top: 50%;
  background: var(--white);
  border-radius: 50%;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0