Collection of free HTML and CSS fire animation code examples

Browse a collection of free HTML and CSS fire animation code examples to add dynamic and eye-catching fire effects to your website.

A CSS Candle Animation

About a code

The candle is made up of several parts, each represented by a different div element with a unique class. The animation of the flame is achieved using the g-ball class. This class is applied to 200 div elements, each representing a small part of the flame. These elements are animated to move upwards, creating the illusion of a flickering flame. The mix-blend-mode: screen property is used to blend the colors of the flame elements together, enhancing the visual effect.

About a code

Animating a Campfire Scene with CSS

About a code

The flames are created using CSS pseudo-elements and borders to form triangles, which are then colored to resemble fire. The flames also have an opacity set to give them a more realistic, glowing effect. The animation of the flames and the smoke is achieved using CSS keyframes. The flicker animation applies a rotation and scale transformation to the flames, creating a flickering effect. The dash animation is applied to the smoke path, creating the illusion of rising smoke. The code also uses CSS variables for colors, allowing for easy customization of the scene. The use of absolute positioning and z-index properties helps layer the elements correctly to create depth in the scene.

About a code

Fire Animation in CSS

About a code

This snippet of CSS code is a perfect example of how to create a realistic fire animation using keyframes. The code defines two animations: fire and spark. The fire animation uses the scaleY transformation to change the vertical size of the flame elements, creating the illusion of flickering flames. The animation alternates between different scaling factors at different percentages of the animation duration, which gives the flame its dynamic, natural movement. The spark animation, on the other hand, simulates the random, fleeting nature of sparks. It uses the scaleY transformation to change the size of the spark elements and the translateY transformation to move them upward. The opacity property is also animated to make the sparks appear and disappear, enhancing the realism of the animation.

About a code

A CSS-only Fire

About a code

The fire effect is achieved using multiple background images on pseudo-elements ::before and ::after of the .fire class. These images include a glitter texture and two gradients - a linear one to create the flame and a radial one for the ember effect. The background-blend-mode property is used to blend these images together, creating a realistic fire effect. The animation is created using the @keyframes rule, which changes the background-position of the images, giving the illusion of a flickering flame. The filter property is used to adjust the brightness, blur, and contrast of the fire, enhancing the overall effect.

About a code

Play With Fire - Box Shadow Flames & Keyframes Animation

Author:
Patrick Freedom Mayer | August 8, 2022
Made with:
HTML / CSS (SCSS) / JS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Burning Match

Author:
Alvaro Montoro | January 10, 2022
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Sparks Float Up From A Blazing Fire

Author:
Jess | September 22, 2021
Made with:
HTML / CSS (SCSS)

About a code

CSS Animation of sparks floating up from a blazing fire.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

SCSS Candle

Author:
Menashe Bouhadana | January 11, 2021
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Flame Animation

Author:
Uwe Chardon | March 8, 2020
Made with:
HTML / CSS

About a code

Litte CSS animation with SVG.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
One Div Flame

One Div Flame

Author:
Chalda Pnuzig | December 22, 2018
Made with:
HTML (Pug) / CSS (SCSS)

About a code

Animated flame with HTML one div and CSS animation.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-

Fahrenheit 451 - Fire

Author:
reaganhenke | December 21, 2018
Made with:
HTML / CSS

About a code

Lots of box shadows used to make the burn hole.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Fireplace

Author:
Guilmain Dorian | December 20, 2018
Made with:
HTML (Pug) / CSS (Less)

About a code

What is it about a fireplace that draws you to its flame? Is it the warmth created like a sun that came and shone upon your body with the intensity of heat? Or is it the comfortable feeling which makes you feel replete? The flicker and the crackle, the sizzle that you hear invites your senses to remain close to the hearth and peer hypnotically tranquilized quietly taking a rest like a bird in sunshine in a cozy, cozy nest.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Campfire Animation

Campfire Animation

Author:
Jamie Coulter | December 20, 2018
Made with:
HTML / CSS (SCSS)

About a code

No image pixelart campfire animation. CSS box-shadow only.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-

CSS Animated Christmas Candles

Author:
CSS Animated Christmas Candles | December 19, 2018
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Cake and Candle

Author:
Ludo | December 19, 2018
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Campfire: Pure CSS

Author:
Kyle Wetton | December 18, 2018
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
CSS Spark

CSS Spark

Author:
Ivan Grozdic | December 17, 2018
Made with:
HTML / CSS / JavaScript

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
bootstrap.css, jquery.js, popper.js, bootstrap.js

Fire

Author:
Romina | November 15, 2018
Made with:
HTML / CSS (SCSS)

About a code

Responsive CSS bonfire.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Fire

Author:
Rose Liu | November 13, 2018
Made with:
HTML (Haml) / CSS (SCSS)

About a code

A pure CSS campfire.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
CSS Blend Mode Fire

CSS Blend Mode Fire

Author:
Jon Kantner | June 13, 2018
Made with:
HTML (Pug) / CSS (SCSS)

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-

CSS Candle Flame Animation

Author:
Mamun Khandaker | April 26, 2018
Made with:
HTML / CSS

About a code

Animated candle flame with pure CSS.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-
Only CSS: Fire

Only CSS: Fire

Author:
Yusuke Nakaya | August 2, 2017
Made with:
HTML (Pug) / CSS (SCSS)

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Simple CSS-Only Fire Animation

Simple CSS-Only Fire Animation

Author:
Satrio Yamanda | February 25, 2017
Made with:
HTML / CSS

About a code

Simple animation of fire using plain HTML & CSS3.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-
Animated Fire with SVG + CSS

Animated Fire with SVG + CSS

Author:
Tahina | January 27, 2017
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-
CSS Fire

CSS Fire

Author:
Zed Dash | May 14, 2016
Made with:
HTML / CSS (SCSS)

About a code

Completely relative fire animation based off of https://dribbble.com/shots/2651843-Fire-loader

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
SVG CSS Fire Animation

SVG CSS Fire Animation

Author:
Deepak K Vijayan | April 21, 2016
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-
Fire in HTML and CSS

Fire in HTML and CSS

Author:
Brian Bravo | March 8, 2014
Made with:
HTML (Haml) / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-
CSS Flame Animation

CSS Flame Animation

Author:
Adrian Payne | October 5, 2013
Made with:
HTML / CSS

About a code

An animated flame using only CSS3 animations and box-shadow.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-

Discover Our Extensive Snippet Library

This heading suggests that your website provides a wide variety of snippets across different technologies, encouraging users to explore and use these resources for their development projects.

HTML Snippets.

Explore a collection of HTML snippets designed to streamline your web development process. From basic structures to complex elements.

CSS Snippets.

Discover powerful CSS snippets that help you style your web pages with ease. Whether you need layout solutions, animations

JavaScript Snippets.

Enhance your website's interactivity with our JavaScript snippets. From DOM manipulation to advanced algorithms

Bootstrap Snippets.

Leverage the power of Bootstrap with our collection of snippets. Quickly integrate responsive design components

Tailwind Snippets.

Speed up your development process with Tailwind CSS snippets. These utility-first CSS snippets enable you to

jQuery Snippets.

Simplify your JavaScript development with jQuery snippets. Easily perform common tasks like event handling, animations

React Snippets.

Build robust, component-based user interfaces with our React snippets. From state management to lifecycle methods,

Vue Snippets.

Streamline Vue.js development with our collection of snippets for creating components, managing state, and handling events.

Ready to set your Brand ablaze?

Let's craft a visual identity that ignites passion and loyalty. ✨