gsap+svg实现火苗燃烧动画效果代码

代码语言:html

所属分类:动画

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

代码标签: gsap svg 火苗 燃烧 动画

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

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

<head>
   
<meta charset="UTF-8">
   
<style>
        body
{
       
font-family: sans-serif;
       
width: 100%;
       
height: 100vh;
       
display: flex;
       
justify-content: space-around;
   
}
    svg
{
       
width: 80px;
       
max-height: 90%;
   
}
   
</style>

</head>

<body>
   
<!-- partial:index.partial.html -->
   
<svg class="fire" viewBox="0 -20 120 240">
   
<defs>
               
<linearGradient id="fire-gradient-basic" x1="0%" y1="0%" x2="0%" y2="100%">
                       
<stop stop-color="#ffb200" offset="0.2" />
                       
<stop stop-color="#dc0000" offset="1" />
               
</linearGradient>
               
<linearGradient id="fire-gradient-red" x1="0%" y1="0%" x2="0%" y2="100%">
                       
<stop stop-color="#ffb200" offset="0" />
                       
<stop stop-color="#dc0000" offset="0.9" />
               
</linearGradient>
               
<linearGradient id="fire-gradient-yellow" x1="0%" y1="0%" x2="0%" y2="100%">
                       
<stop stop-color="#ffb200" offset="0.3" />
                       
<stop stop-color="#dc0000" offset="1" />
               
</linearGradient>
       
</defs>

   
<g stroke-width="0.5" stroke-opacity="0.5">
               
<path class="spark" fill="#ffd700" stroke="#ff0" d="M13 90c-8,-10 -6,-14 -5,-21 3,-3 0,-7 -2,-19 8,11 18,12 7,40l0 0z"></path>
                <path class="spark" fill="#ffd700" stroke="#ff0" d="M36 45c8,-10 6,-14 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0