css实现一个火苗燃烧动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现一个火苗燃烧动画效果代码

代码标签: 火苗 燃烧 动画 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
body {
  display: grid;
  grid-template: 1fr 1fr 1fr/1fr 1fr 1fr;
  background: black;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.fire {
  position: relative;
  grid-column: 2/3;
  grid-row: 2/3;
  align-self: end;
  justify-self: center;
  width: 300px;
  height: 300px;
  background: #880e4f;
  border-radius: 50%;
  box-shadow: 0 0 50px 50px #880e4f;
  animation: background 5s ease infinite;
}

.flame {
  position: absolute;
  bottom: 70px;
  width: 100px;
  height: 100px;
  background-color: red;
  border-radius: 0 70%;
  box-shadow: -10px -10px 0 10px orange, -20px -20px 0 20px yellow;
  animation: flicker 5s ease infinite;
}

.f1 {
  left: 50px;
}

.f3 {
  transform: rotateZ(45deg);
  left: 100px;
  bottom: 100px;
}

.f2 {
  transform: rotateZ(90deg);
  left: 150px;
}

.log {
  position: absolute;
  bottom: 15px;
  left: 50px;
  width: 200px;
  height: 50px;
  background-color: brown;
  border-radius: 10px;
}

.l1 {
  transform: rotateZ(20deg);
  box-shadow: 0 0 10px #3e2723;
}

.l2 {
  transform: rotateZ(-20deg);
  box-shadow: 0 0 10px #3e2723;
}

.l3 {
  transform: rotate3d(1, 1, 1, 40deg);
}

.l4 {
  transform: rotate3d(1, 1, 1, -40deg);
}

.spark {
  width: 5px;
  height: 5px;
  background-color: orangered;
  border-radius: 50%;
  box-shadow: 0 0 5px 3px orange;
  position: absolute;
  top: 150px;
  left: 150px;
  opacity: 0;
}

.s1 {
  animation: fadein 5s ease infinite, floatup 5s ease infinite, left 5s ease infinite;
}

.s2 {
  animation: fadein 5s 0.5s ease infinite, floatup 5s 0.5s ease infinite, right 5s 0.5s ease infinite;
}

.s3 {
  animation: fadein 5s 1s ease infinite, floatup 5s 1s ease infinite, farleft 5s 1s ease infinite;
}

.s4 {
  animation: fadein 5s 1.5s ease infinite, floatup 5s 1.5s ease infinite, farright 5s 1.5s ease infinite;
}

.s5 {
  animation: fadein 5s 2s linear infinite, floatup 5s 2s linear infinite;
}

.s6 {
  animation: fadein 5s 2.5s ease infinite, floatup 5s 2.5s ease infinite, left 5s 2.5s ease infinite;
}

.s7 {
  animati.........完整代码请登录后点击上方下载按钮下载查看

网友评论0