Battery Charging Animation w/ Liquid
How do I make an battery charging animation w/ liquid?
What is a battery charging animation w/ liquid? How do you make a battery charging animation w/ liquid? This script and codes were developed by Chris Holder on 20 June 2022, Monday.
Battery Charging Animation w/ Liquid - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Battery Charging Animation w/ Liquid</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script>
<link href='http://fonts.googleapis.com/css?family=Lato:300,400' rel='stylesheet' type='text/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! */ @keyframes load { 0% { top: 4.5rem; } 70% { top: 1.125rem; } 90% { top: 0; } 95% { top: 0; } 100% { top: 4.5rem; }
}
@keyframes liquid-1 { 0% { height: 0; opacity: 0; top: -0.5rem; } 22% { height: 0.28125rem; top: 0.375rem; opacity: 1; } 25% { top: -0.25rem; } 35% { height: 1.125rem; top: -0.5rem; } 55% { height: 0.28125rem; top: -0.125rem; } 60% { height: 0.61875rem; opacity: 1; top: -0.275rem; } 96% { height: 0.84375rem; opacity: 0; top: 0.5rem; } 100% { height: 0; opacity: 0; }
}
@keyframes liquid-2 { 0% { height: 0; opacity: 0; top: -0.5rem; } 17.5% { height: 0.28125rem; top: 0.2rem; opacity: 1; } 20% { top: -0.25rem; } 25% { height: 1.40625rem; top: -0.625rem; } 45% { height: 0.28125rem; top: -0.125rem; } 60% { height: 1.40625rem; opacity: 1; top: -0.5rem; } 96% { height: 0.84375rem; opacity: 0; top: 0.5rem; } 100% { height: 0; opacity: 0; }
}
.battery { display: inline-block; position: relative; width: 2.25rem; height: 4.5rem; box-shadow: 0 0 0 0.2rem #425C77; background: white; border-radius: 0.09rem;
}
.battery:before { content: ''; position: absolute; left: 0.5625rem; right: 0.5625rem; top: -0.3375rem; height: 0.3375rem; width: 1.125rem; background: #425C77; border-radius: 0.18rem;
}
.battery:after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-right: 2.25rem solid transparent; border-bottom: 4.05rem solid rgba(255, 255, 255, 0.325);
}
.liquid { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 2.25rem; background: #71FB85; animation: load 2.25s infinite;
}
.liquid:after, .liquid:before { content: ''; position: absolute; top: -0.5rem; height: 1.125rem; width: 1.4625rem; background: #71FB85; border-radius: 50%; opacity: 0;
}
.liquid:after { right: 0; animation: liquid-1 2.25s infinite;
}
.liquid:before { left: 0; animation: liquid-2 2.25s infinite;
}
body { padding-top: 30vh; background: #efefef; text-align: center;
}
@keyframes power { 0% { color: #bcbcbc; } 75% { color: #bcbcbc; text-shadow: none; } 90% { color: #58fa70; text-shadow: 0 0 0.8em #71FB85; } 100% { color: #bcbcbc; text-shadow: none; }
}
h5 { font-family: Lato, sans-serif; font-weight: 300; letter-spacing: 0.025rem; text-transform: uppercase; color: #bcbcbc; animation: power 2.25s infinite;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="battery"> <div class="liquid"></div>
</div>
<h5>Power Up</h5> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Battery Charging Animation w/ Liquid - Script Codes CSS Codes
@keyframes load { 0% { top: 4.5rem; } 70% { top: 1.125rem; } 90% { top: 0; } 95% { top: 0; } 100% { top: 4.5rem; }
}
@keyframes liquid-1 { 0% { height: 0; opacity: 0; top: -0.5rem; } 22% { height: 0.28125rem; top: 0.375rem; opacity: 1; } 25% { top: -0.25rem; } 35% { height: 1.125rem; top: -0.5rem; } 55% { height: 0.28125rem; top: -0.125rem; } 60% { height: 0.61875rem; opacity: 1; top: -0.275rem; } 96% { height: 0.84375rem; opacity: 0; top: 0.5rem; } 100% { height: 0; opacity: 0; }
}
@keyframes liquid-2 { 0% { height: 0; opacity: 0; top: -0.5rem; } 17.5% { height: 0.28125rem; top: 0.2rem; opacity: 1; } 20% { top: -0.25rem; } 25% { height: 1.40625rem; top: -0.625rem; } 45% { height: 0.28125rem; top: -0.125rem; } 60% { height: 1.40625rem; opacity: 1; top: -0.5rem; } 96% { height: 0.84375rem; opacity: 0; top: 0.5rem; } 100% { height: 0; opacity: 0; }
}
.battery { display: inline-block; position: relative; width: 2.25rem; height: 4.5rem; box-shadow: 0 0 0 0.2rem #425C77; background: white; border-radius: 0.09rem;
}
.battery:before { content: ''; position: absolute; left: 0.5625rem; right: 0.5625rem; top: -0.3375rem; height: 0.3375rem; width: 1.125rem; background: #425C77; border-radius: 0.18rem;
}
.battery:after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-right: 2.25rem solid transparent; border-bottom: 4.05rem solid rgba(255, 255, 255, 0.325);
}
.liquid { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 2.25rem; background: #71FB85; animation: load 2.25s infinite;
}
.liquid:after, .liquid:before { content: ''; position: absolute; top: -0.5rem; height: 1.125rem; width: 1.4625rem; background: #71FB85; border-radius: 50%; opacity: 0;
}
.liquid:after { right: 0; animation: liquid-1 2.25s infinite;
}
.liquid:before { left: 0; animation: liquid-2 2.25s infinite;
}
body { padding-top: 30vh; background: #efefef; text-align: center;
}
@keyframes power { 0% { color: #bcbcbc; } 75% { color: #bcbcbc; text-shadow: none; } 90% { color: #58fa70; text-shadow: 0 0 0.8em #71FB85; } 100% { color: #bcbcbc; text-shadow: none; }
}
h5 { font-family: Lato, sans-serif; font-weight: 300; letter-spacing: 0.025rem; text-transform: uppercase; color: #bcbcbc; animation: power 2.25s infinite;
}
Developer | Chris Holder |
Username | see8ch |
Uploaded | June 20, 2022 |
Rating | 4.5 |
Size | 4,077 Kb |
Views | 91,080 |
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 |
Northerli Logo | 5,477 Kb |
Localhost Directory GUI | 3,997 Kb |
Experiment - SCSS SVG Background Image with Variables | 3,270 Kb |
GSchool Workshop Demo - Winter 2015 | 2,017 Kb |
My Logo | 2,811 Kb |
GSchool Workshop Demo - Winter 2015 | 3,433 Kb |
DevCamp 2014 - Denver Public Library | 5,033 Kb |
A Pen by Chris Holder | 2,538 Kb |
One from many. | 2,423 Kb |
Readable typography mixin - auto line height | 2,827 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 |
A Pen by Shidhin | Shidhincr | 5,015 Kb |
Zeichensatz | Moklick | 2,058 Kb |
CSS Grid Overlay | Cliffpyles | 3,090 Kb |
Slim Grid SASS SCSS v3.2 | Thesturs | 4,709 Kb |
IE flex collapse bug fix | Rowno | 2,678 Kb |
Sticky menu on scroll | Senff | 2,869 Kb |
Calculator | Rzencoder | 4,572 Kb |
To Do List with Delete | Mattlbrody | 2,068 Kb |
Perforated foil | 0x04 | 2,617 Kb |
Sinclair Research Computers | MattCowley | 3,068 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!