实现效果
实现代码
ht ML
<div class="cont ai ner"> <div class=" red fl am e"></div> <div class="orange flame"></div> <div class="yellow flame"></div> <div class="wh IT e flame"></div> <div class="blue circle"></div> <div class="black circle"></div> </div>
CSS3
body{
background:black;
}
.container{
m arg in:80px auto;
width: 60px;
h ei ght: 60px;
position:relative;
transform-ori gin : center bottom;
animation-name: flicker;
animation-duration:3ms;
animation-delay:200ms;
animation -t iming-function: ease -i n;
animation-iteration-count: infinite;
animation-direction: alternate;
}
.flame{
bottom:0;
position:absolute;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
border-top-left-radius: 50%;
transform:rotate(-45 deg ) scale(1.5,1.5);
}
.yellow{
left:15px;
width: 30px;
height: 30px;
background:gold;
box -s hadow: 0px 0px 9px 4px gold;
}
.orange{
left:10px;
width: 40px;
height: 40px;
background:orange;
box-shadow: 0px 0px 9px 4px orange;
}
.red{
left:5px;
width: 50px;
height: 50px;
background:OrangeRed;
box-shadow: 0px 0px 5px 4px OrangeRed;
}
.white{
left:15px;
bottom:-4px;
width: 30px;
height: 30px;
background:white;
box-shadow: 0px 0px 9px 4px white;
}
.circle{
border-radius: 50%;
position:absolute;
}
.blue{
width: 10px;
height: 10px;
left:25px;
bottom:-25px;
background: SlateBlue;
box-shadow: 0px 0px 15px 10px SlateBlue;
}
.black{
width: 40px;
height: 40px;
left:10px;
bottom:-60px;
background: black;
box-shadow: 0px 0px 15px 10px black;
}
@keyframes flicker{
0% {transform: rotate(-1deg);}
20% {transform: rotate(1deg);}
40% {transform: rotate(-1deg);}
60% {transform: rotate(1deg) scaleY(1.04);}
80% {transform: rotate(-2deg) scaleY(0.92);}
100% {transform: rotate(1deg);}
}
以上就是CSS3 实现的火焰动画的详细内容,更多关于CSS3 火焰动画的资料请关注其它相关 文章 !
总结
以上是 为你收集整理的 CSS3 实现的火焰动画 全部内容,希望文章能够帮你解决 CSS3 实现的火焰动画 所遇到的问题。
如果觉得 网站内容还不错, 推荐好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did201659