Animated fire extinguisher

Developer
Size
3,223 Kb
Views
50,600

How do I make an animated fire extinguisher?

Quick and dirty fire extinguisher animation using font-awesome icons. What is a animated fire extinguisher? How do you make a animated fire extinguisher? This script and codes were developed by Adrian Payne on 18 August 2022, Thursday.

Animated fire extinguisher Previews

Animated fire extinguisher - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Animated fire extinguisher</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.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: #fefefe;
}
.container { width: 30px; height: 30px; margin: 50px auto 0 auto; position: relative;
}
.extinguish { cursor: pointer; font-size: 30px; color: firebrick; width: 30px; height: 30px; text-align: center; transition: transform 150ms ease-out; vertical-align: top;
}
.extinguish:hover { transform-origin: 50% 50%; transform: rotateZ(20deg);
}
.extinguish:active { font-size: 28px;
}
.smoke { color: #999; transition: all 120ms ease-out; transform-origin: 50% 50%; transform: rotateY(-180deg) rotateZ(-34deg); position: absolute; top: 4px; left: 28px; opacity: 0;
}
.spray { animation-name: spray; animation-duration: 0.6s; animation-timing-function: ease-out;
}
@keyframes spray { 0% { top: 2px; left: 25px; } 30% { top: 5px; left: 31px; opacity: 1; } 60% { opacity: 1; } 100% { top: 6px; left: 34px; opacity: 0; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="container"> <i class="fa fa-fire-extinguisher extinguish"></i> <i class="fa fa-cloud fa-flip-horizontal smoke"></i>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Animated fire extinguisher - Script Codes CSS Codes

body { background: #fefefe;
}
.container { width: 30px; height: 30px; margin: 50px auto 0 auto; position: relative;
}
.extinguish { cursor: pointer; font-size: 30px; color: firebrick; width: 30px; height: 30px; text-align: center; transition: transform 150ms ease-out; vertical-align: top;
}
.extinguish:hover { transform-origin: 50% 50%; transform: rotateZ(20deg);
}
.extinguish:active { font-size: 28px;
}
.smoke { color: #999; transition: all 120ms ease-out; transform-origin: 50% 50%; transform: rotateY(-180deg) rotateZ(-34deg); position: absolute; top: 4px; left: 28px; opacity: 0;
}
.spray { animation-name: spray; animation-duration: 0.6s; animation-timing-function: ease-out;
}
@keyframes spray { 0% { top: 2px; left: 25px; } 30% { top: 5px; left: 31px; opacity: 1; } 60% { opacity: 1; } 100% { top: 6px; left: 34px; opacity: 0; }
}

Animated fire extinguisher - Script Codes JS Codes

var extinguisher = $('.extinguish'), smoke = $('.smoke');
extinguisher.on("mousedown",function() { smoke.addClass('spray'); smoke.one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) { smoke.removeClass('spray'); });
});
Animated fire extinguisher - Script Codes
Animated fire extinguisher - Script Codes
Home Page Home
Developer Adrian Payne
Username dazulu
Uploaded August 18, 2022
Rating 3
Size 3,223 Kb
Views 50,600
Do you need developer help for Animated fire extinguisher?

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!

Adrian Payne (dazulu) Script Codes
Create amazing blog posts with AI!

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!