div+css实现飞机在空中窗外景色动画代码

代码语言:html

所属分类:动画

代码描述:div+css实现飞机在空中窗外景色动画代码

代码标签: div css 飞机 空中 窗外 景色 动画 代码

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
  
<style>
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(180deg, 10%, 5%);
}

.cloud-layer {
  position: absolute;
  inset: 0;
  background-size: 200% 100%;
  animation: 15s scroll linear infinite;
}

.cloud-layer + .cloud-layer {
  animation: 30s scroll linear infinite;
}

.window {
  position: fixed;
  border-radius: min(20vh, 20vw);
  height: min(80vh, 80vw);
  width: min(60vh, 60vw);
  background-color: skyblue;
  overflow: hidden;
  box-shadow: 0 0 min(10vh, 10vw) skyblue;
}

.wing {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(70deg, hsl(0deg, 0%, 98%) 49.75%, hsl(0deg, 0%, 50%) 50%, hsl(0deg, 0%, 50%) 50.5%, hsl(0deg, 0%, 100%) 50.75%);
  clip-path: polygon(100% 60%, 50% 36.25%, 38.75% 25%, 35% 25%, 40% 37.5%, 37.5% 50%, 20% 80%, 0% 100%, 100% 100%);
}

.accent {
  position: absolute;
  inset: 0;
  background-color: red;
  clip-path: polygon(50% 36.25%, 40% 25%, 35% 25%, 40% 37.5%);
}

@keyframes scroll {
  0% { backg.........完整代码请登录后点击上方下载按钮下载查看

网友评论0