css实现北极光运动动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现北极光运动动画效果代码

代码标签: 运动 动画 效果

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


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

<head>

  <meta charset="UTF-8">


  
  
<style>
.canvas {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(31, 164, 152, 0.6)) 0 100%/100% 60%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 3% 70%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 7% 60%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 3% 47%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 26% 65%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 20% 50%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 12% 53%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 10% 40%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 24% 34%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 38% 35%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 24% 48%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 7% 30%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 2% 20%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 5% 4%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 10% 15%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 15% 8%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 20% 20%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 80% 36%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 84% 50%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 97% 50%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 85% 40%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 90% 54%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 50% 40%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 55% 49%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 48% 55%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 33% 45%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 80% 60%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 88% 70%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 30% 24%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 30% 10%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 15% 30%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 38% 3%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 68% 30%/0.2% 0.2%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 90% 32%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 85% 10%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 60% 16%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 88% 12%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 96% 5%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 75% 18%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.9) 70%, transparent 70%) 47% 14%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 54% 10%/0.2% 0.25%, radial-gradient(rgba(255, 250, 250, 0.5) 70%, transparent 70%) 53% 23%/0.2% 0.25%, linear-gradient(#141521, #022e4e, #03518a);
  background-repeat: no-repeat;
  z-index: 1;
}

.mountain:nth-of-type(1) {
  position: absolute;
  background: linear-gradient(#022b49, transparent);
  clip-path: polygon(49% 0, 51% 0, 100% 100%, 0% 100%);
  border-radius: 50% 50% 0 0;
  z-index: 2;
  width: 50%;
  height: 40%;
  left: -10%;
  bottom: 0%;
}
.mountain:nth-of-type(1)::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  right: 5%;
  background: inherit;
  clip-path: inherit;
  border-radius: inherit;
}
.mountain:nth-of-type(1)::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 15%;
  background: linear-gradient(rgba(255, 250, 250, 0.5), transparent);
}

.mountain:nth-of-type(2) {
  position: absolute;
  background: linear-gradient(#022b49, transparent);
  clip-path: polygon(49% 0, 51% 0, 100% 100%, 0% 100%);
  border-radius: 50% 50% 0 0;
  z-index: 2;
  background: linear-gradient(#022e4e, rgba(20, 21, 33, 0.8));
  width: 60%;
  height: 50%;
  left: 10%;
  bottom: 0%;
  z-index: 3;
}
.mountain:nth-of-type(2)::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  right: 5%;
  background: inherit;
  clip-path: inherit;
  border-radius: inherit;
}
.mountain:nth-of-type(2)::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 15%;
  background: linear-gradient(rgba(255, 250, 250, 0.5), transparent);
}

.mountain:nth-of-type(3) {
  position: absolute;
  background: linear-gradient(#022b49, transparent);
  clip-path: polygon(49% 0, 51% 0, 100% 100%, 0% 100%);
  border-radius: 50% 50% 0 0;
  z-index: 2;
  width: 50%;
  height: 65%;
  left: 40%;
  bottom: 0%;
}
.mountain:nth-of-type(3)::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  right: 5%;
  background: inherit;
  clip-path: inherit;
  border-radius: inherit;
}
.mountain:nth-of-type(3)::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 15%;
  background: linear-gradient(rgba(255, 250, 250, 0.5), transparent);
}

.mountain:nth-of-type(4) {
  position: absolute;
  background: linear-gradient(#022b49, transpa.........完整代码请登录后点击上方下载按钮下载查看

网友评论0