css+js实现火苗燃烧动画效果代码

代码语言:html

所属分类:动画

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

代码标签: css js 火苗 燃烧 动画

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">

<style>
    body{
  background: black;
  display: grid;
  place-content: center;
}

.fire{
  position: relative;
  margin: 0 auto;
  width: 300px;
  height: 400px;
  filter: blur(3px);
}

.particle{
  position: absolute;
  bottom: 0;
  background-image: radial-gradient(#e34826 20%, blue 70%);
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  mix-blend-mode: screen;
  left: calc(50% * (var(--i) - 1) / 100);
  animation: up 1s ease-in infinite;
  animation-delay: calc(1s * var(--rand));
}

@keyframes up{
  from{
    opacity.........完整代码请登录后点击上方下载按钮下载查看

网友评论0