多多少少,路有不同,才明白凡事都有代价
 
# 预览
原生html css小火苗加载动画
# HTML
 


div class="fire">  div class="fire-left">    div class="main-fire">div>    div class="particle-fire">div>  div>  div class="fire-center">    div class="main-fire">div>    div class="particle-fire">div>  div>  div class="fire-right">    div class="main-fire">div>    div class="particle-fire">div>  div>  div class="fire-bottom">    div class="main-fire">div>  div>div>
 
# CSS
@keyframes scaleUpDown {  0%100% {    transformscaleY(1scaleX(1);  }
  50%90% {    transformscaleY(1.1);  }
  75% {    transformscaleY(0.95);  }
  80% {    transformscaleX(0.95);  }}
@keyframes shake {  0%100% {    transformskewX(0scale(1);  }
  50% {    transformskewX(5degscale(0.9);  }}
@keyframes particleUp {  0% {    opacity0;  }
  20% {    opacity1;  }
  80% {    opacity1;  }
  100% {    opacity0;    top: -100%;    transformscale(0.5);  }}
@keyframes glow {  0%100% {    background-color#ef5a00;  }
  50% {    background-color#ff7800;  }}
.fire {  position: absolute;  topcalc(50% - 50px);  leftcalc(50% - 50px);  width100px;  height100px;  background-color: transparent;  margin-left: auto;  margin-right: auto;}
.fire-center {  position: absolute;  height100%;  width100%;  animation: scaleUpDown 3s ease-out;  animation-iteration-count: infinite;  animation-fill-mode: both;}
.fire-center .main-fire {  position: absolute;  width100%;  height100%;  background-imageradial-gradient(farthest-corner at 10px 0#d43300 0%#ef5a00 95%);  transformscaleX(0.8rotate(45deg);  border-radius0 40% 60% 40%;  filterdrop-shadow(0 0 10px #d43322);}
.fire-center .particle-fire {  position: absolute;  top60%;  left45%;  width10px;  height10px;  background-color#ef5a00;  border-radius50%;  filterdrop-shadow(0 0 10px #d43322);  animation: particleUp 2s ease-out 0;  animation-iteration-count: infinite;  animation-fill-mode: both;}
.fire-right {  height100%;  width100%;  position: absolute;  animation: shake 2s ease-out 0;  animation-iteration-count: infinite;  animation-fill-mode: both;}
.fire-right .main-fire {  position: absolute;  top15%;  right: -25%;  width80%;  height80%;  background-color#ef5a00;  transformscaleX(0.8rotate(45deg);  border-radius0 40% 60% 40%;  filterdrop-shadow(0 0 10px #d43322);}
.fire-right .particle-fire {  position: absolute;  top45%;  left50%;  width15px;  height15px;  background-color#ef5a00;  transformscaleX(0.8rotate(45deg);  border-radius50%;  filterdrop-shadow(0 0 10px #d43322);  animation: particleUp 2s ease-out 0;  animation-iteration-count: infinite;  animation-fill-mode: both;}
.fire-left {  position: absolute;  height100%;  width100%;  animation: shake 3s ease-out 0;  animation-iteration-count: infinite;  animation-fill-mode: both;}
.fire-left .main-fire {  position: absolute;  top15%;  left: -20%;  width80%;  height80%;  background-color#ef5a00;  transformscaleX(0.8rotate(45deg);  border-radius0 40% 60% 40%;  filterdrop-shadow(0 0 10px #d43322);}
.fire-left .particle-fire {  position: absolute;  top10%;  left20%;  width10%;  height10%;  background-color#ef5a00;  border-radius50%;  filterdrop-shadow(0 0 10px #d43322);  animation: particleUp 3s infinite ease-out 0;  animation-fill-mode: both;}
.fire-bottom .main-fire {  position: absolute;  top30%;  left20%;  width75%;  height75%;  background-color#ff7800;  transformscaleX(0.8rotate(45deg);  border-radius0 40% 100% 40%;  filterblur(10px);  animation: glow 2s ease-out 0;  animation-iteration-count: infinite;  animation-fill-mode: both;}