css+js实现火盆中火焰燃烧动画效果代码
代码语言:html
所属分类:动画
代码描述:css+js实现火盆中火焰燃烧动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html> <head> <style> body { margin: 0; overflow: hidden; background-color: #1a1a1a; } .center { position: absolute; margin: auto; top: 0; bottom: 0; left: 0; right: 0; } canvas { position: absolute; } .gooeys { width: 100%; height: 100%; -webkit-filter: url('#filter'); filter: url('#filter'); } .bg { width: 390px; height: 390px; background-color: white; border-radius: 50%; -webkit-transition: all 0.5s; transition: all 0.5s; } .pot { box-sizing: border-box; width: 250px; height: 120px; top: 100px; background: -webkit-radial-gradient(#121, #111 45%); background: radial-gradient(#121, #111 45%); border-radius: 25px 25px 80px 80px; } .pot-top { box-sizing: border-box; width: 250px; height: 40px; background-color: #111; top: -50px; border-radius: 20px 20px 80px 80px; box-shadow: #4f4 0 10px 45px -17px inset; } .highlight { content: ""; top: 20px; bottom: auto; background-color: rgba(68,255,68,0.3); width: 150px; height: 0; border-radius: 0 0 50% 50%; box-shadow: #4f4 0 0 35px 2px; } .glow { top: -100px; width: 0px; height: 0px; border-radius: 50%; color: rgba(68,255,68,0.4); box-shadow: 0 0 150px 50px; -webkit-animation: glow 0.5s linear infinite alternate; animation: glow 0.5s linear infinite alternate; } .shadow { top: 210px; width: 220px; height: 20px; background-color: #111; border-radius: 50%; } @-webkit-keyframes glow { to { box-shadow: 0 0 120px 50px; } } @keyframes glow { to { box-shadow: 0 0 120px 50px; } } </style> </head> <body> <div class="gooeys center"> <canvas style="position:absolute;" id="canvas" <="" canvas="" width="1047" height="679"> </canvas> </div> <div class="glow center"></div> <div class="shadow center"></div> <div class="pot-top center"></div> <div class="pot center"></div> <svg> <defs> <filter id="filter"> <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur"></feGaussianBlur> <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0.........完整代码请登录后点击上方下载按钮下载查看
网友评论0