css实现大雁蓝天白云下飞翔动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现大雁蓝天白云下飞翔动画效果代码

代码标签: 蓝天 白云 飞翔 动画 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
  
  
<style>
*, *::before, *::after {
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

body {
  background-color: #111;
  color: #ff0;
  font-size: 30px;
  min-height: 100vh;
  overflow: hidden;
}

.sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 0px 0,#fff, #fff0 8em), radial-gradient(circle at 240px 0,#fff, #fff0 7em), radial-gradient(circle at 450px 0,#fff, #fff0 8em), radial-gradient(circle at 690px 0,#fff, #fff0 4em), radial-gradient(circle at 810px 0,#fff, #fff0 7em), radial-gradient(circle at 1020px 0,#fff, #fff0 6em), radial-gradient(circle at 1200px 0,#fff, #fff0 5em), radial-gradient(circle at 1350px 0,#fff, #fff0 7em), radial-gradient(circle at 1560px 0,#fff, #fff0 6em), radial-gradient(circle at 1740px 0,#fff, #fff0 8em), radial-gradient(circle at 1980px 0,#fff, #fff0 6em), linear-gradient(150deg, hsl(230, 75%, 90%), hsl(210, 75%, 60%));
}

.container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: blur(0.15em) contrast(6);
  mix-blend-mode: multiply;
}

.bird {
  position: relative;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background-color: #000;
  perspective: 20em;
  -webkit-animation: bird 1.5s -2.625s infinite ease-in-out alternate;
          animation: bird 1.5s -2.625s infinite ease-in-out alternate;
}
@-webkit-keyframes bird {
  from {
    transform: translateY(0.3em);
  }
  to {
    transform: translateY(-0.3em);
  }
}
@keyframes bird {
  from {
    transform: translateY(0.3em);
  }
  to {
    transform: translateY(-0.3em);
  }
}

.wing {
  position: absolute;
  top: 0.15em;
  left: 50%;
  width: 0;
  height: 1em;
}
.wing:nth-child(1) {
  transform: rotateY(60deg);
}
.wing:nth-child(2) {
  transform: rotateY(120deg);
}
.wing div {
  position: absolute;
  left: 100%;
  width: 10em;
  height: 1em;
  background-color: #000;
  transform-origin: left;
  -webkit-animation: flap 1.5s infinite ease-in-out alternate;
          animation: flap 1.5s infinite ease-in-out alternate;
}
@-webkit-keyframes flap {
  from {
    transform: rotate(var(--a1));
  }
  to {
    transform: rotate(var(--a2));
  }
}
@keyframes flap {
  from {
    transform: rotate(var(--a1));
  }
  to {
    transform: rotate(var(--a2));
  }
}
.wing > div {
  --a1: -3deg;
  --a2: 3deg;
  -webkit-animation-delay: -3s;
          animation-delay: -3s;
}
.wing > div > div {
  --a1: -2.7deg;
  --a2: 2.7deg;
  -webkit-animation-delay: -2.79s;
          animation-delay: -2.79s;
}
.wing > div > div > div {
  --a1: -2.4deg;
  --a2: 2.4deg;
  -webkit-animation-delay: -2.58s;
          animation-delay: -2.58s;
}
.wing > div > div > div > div {
  --a1: -2..........完整代码请登录后点击上方下载按钮下载查看

网友评论0