CSS Flame Animation
How do I make an css flame animation?
An animated flame using only CSS3 animations and box-shadow. Wanted to see if I could make fire with just CSS - flame on! :). What is a css flame animation? How do you make a css flame animation? This script and codes were developed by Adrian Payne on 18 August 2022, Thursday.
CSS Flame Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Flame Animation</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body{ background:black;
}
.container{ margin:80px auto; width: 60px; height: 60px; position:relative; transform-origin:center bottom; animation-name: flicker; animation-duration:3ms; animation-delay:200ms; animation-timing-function: ease-in; 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(-45deg) scale(1.5,1.5);
}
.yellow{ left:15px; width: 30px; height: 30px; background:gold; box-shadow: 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);}
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="container"> <div class="red flame"></div> <div class="orange flame"></div> <div class="yellow flame"></div> <div class="white flame"></div> <div class="blue circle"></div> <div class="black circle"></div>
</div> <script src="js/index.js"></script>
</body>
</html>
CSS Flame Animation - Script Codes CSS Codes
body{ background:black;
}
.container{ margin:80px auto; width: 60px; height: 60px; position:relative; transform-origin:center bottom; animation-name: flicker; animation-duration:3ms; animation-delay:200ms; animation-timing-function: ease-in; 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(-45deg) scale(1.5,1.5);
}
.yellow{ left:15px; width: 30px; height: 30px; background:gold; box-shadow: 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);}
}
CSS Flame Animation - Script Codes JS Codes
/* An animated flame using only CSS3 animations and box-shadow. Wanted to see if I could make fire with just CSS - flame on! :) */
Developer | Adrian Payne |
Username | dazulu |
Uploaded | August 18, 2022 |
Rating | 4.5 |
Size | 2,927 Kb |
Views | 34,408 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Tile Game | 6,146 Kb |
Animation Label Transition | 2,809 Kb |
Simple Advent calendar with message | 4,871 Kb |
Animated fire extinguisher | 3,223 Kb |
Round and round we go... | 3,929 Kb |
CSS modal slide up animation with FB-ish zoom on scroll | 5,349 Kb |
CSS Shop Icon | 3,260 Kb |
A Pen by Adrian Payne | 2,652 Kb |
CSS 3D Rotate | 3,154 Kb |
CSS Ribbons | 2,322 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Tab panels | Accessibility | 0 Kb |
Virtual vinyl | Davidpanik | 3,474 Kb |
Simple, flat contact form | Zeaklous | 2,719 Kb |
A Pen by Theun | Tjoen | 6,152 Kb |
Whyutils | LeYvan | 3,752 Kb |
Blog Concept 2 | JGallardo | 2,994 Kb |
Save for later... | Victorfreire | 1,359 Kb |
Flexbox slider | Rendro | 3,459 Kb |
CSS Social Media Icon | TychoBlender | 3,871 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!