Progress Button Animation
How do I make an progress button animation?
Inspired from http://tympanus.net/Development/ProgressButtonStyles/. What is a progress button animation? How do you make a progress button animation? This script and codes were developed by EY-Intuitive on 17 January 2023, Tuesday.
Progress Button Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Progress Button Animation</title> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <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 { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300;
}
.outer { transition: background-color 0.4s ease; box-sizing: border-box; width: 200px; height: 60px; text-align: center; position: relative; background-color: #1abc9c; margin: 20px; color: #fff; cursor: pointer; line-height: 60px; overflow: hidden;
}
.outer:hover { background-color: #1cc9a7;
}
.outer span { transition: opacity 0.3s ease, margin-top 0.3s ease; display: block; font-size: 18px; position: absolute; top: 50%; right: 20px; margin-top: -20px; opacity: 0;
}
.outer .inner { transition: opacity 0.3s ease; width: 100%; height: 4px; background-color: #16a085; position: absolute; left: 0; bottom: 0; opacity: 0;
}
.outer .inner.active { opacity: 1; animation: progressAnimation 3s ease;
}
.outer.done span { opacity: 1; margin-top: -9px;
}
@keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@-webkit-keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@-moz-keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@-o-keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
p { margin: 20px;
}
p a { color: #1abc9c;
}
p a:visited { color: #1abc9c;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="outer"> Progress <div class="inner"></div> <span class="fa fa-check-circle"></span>
</div>
<p>Click the button to see the progress animation</p>
<p>Inspired from <a href="https://tympanus.net/Development/ProgressButtonStyles/" target="_blank">Codrops</a></p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Progress Button Animation - Script Codes CSS Codes
body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300;
}
.outer { transition: background-color 0.4s ease; box-sizing: border-box; width: 200px; height: 60px; text-align: center; position: relative; background-color: #1abc9c; margin: 20px; color: #fff; cursor: pointer; line-height: 60px; overflow: hidden;
}
.outer:hover { background-color: #1cc9a7;
}
.outer span { transition: opacity 0.3s ease, margin-top 0.3s ease; display: block; font-size: 18px; position: absolute; top: 50%; right: 20px; margin-top: -20px; opacity: 0;
}
.outer .inner { transition: opacity 0.3s ease; width: 100%; height: 4px; background-color: #16a085; position: absolute; left: 0; bottom: 0; opacity: 0;
}
.outer .inner.active { opacity: 1; animation: progressAnimation 3s ease;
}
.outer.done span { opacity: 1; margin-top: -9px;
}
@keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@-webkit-keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@-moz-keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@-o-keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
@keyframes progressAnimation { 0% { width: 0; } 20% { width: 5%; } 40% { width: 20%; } 60% { width: 70%; } 80% { width: 75%; } 100% { width: 100%; }
}
p { margin: 20px;
}
p a { color: #1abc9c;
}
p a:visited { color: #1abc9c;
}
Progress Button Animation - Script Codes JS Codes
$('.outer').click(function(){ $('.inner').addClass('active'); setTimeout(function(){ $('.outer').addClass('done'); }, 3500); setTimeout(function(){ $('.outer').removeClass('done'); $('.inner').removeClass('active'); }, 4500);
});
Developer | EY-Intuitive |
Username | ey_intuitive |
Uploaded | January 17, 2023 |
Rating | 3.5 |
Size | 3,659 Kb |
Views | 10,120 |
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 |
A Pen by EY-Intuitive | 3,258 Kb |
Draggable Timeline Demo | 4,548 Kb |
Reading Interaction | 2,598 Kb |
Awesome Search Button with Input Animation | 3,633 Kb |
Jquery Flyout Navigation | 2,667 Kb |
Hidden Push Nav with Flyouts | 3,948 Kb |
Animated Menu with Submenus | 5,647 Kb |
Gradient Hover Transition on Buttons | 4,209 Kb |
UI Color Shade Previewer | 3,159 Kb |
Pure CSS3 Flyout Navigation | 3,500 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 |
CSS 3D Radio buttons | Andreasnylin | 1,650 Kb |
A Pen by Moeid Saleem | Moeidsaleem | 1,862 Kb |
Angular Sandbox | Alexgurrola | 1,616 Kb |
Sass Radar | Jlong | 6,887 Kb |
Heatmap Color Scales | Stevepepple | 2,331 Kb |
Calculator - codevember 08 - 2016 | Caiocares | 3,260 Kb |
CSS3 Fullscreen Background Slideshow | Leetech | 3,435 Kb |
Two column of responsive height | Fixie | 2,908 Kb |
Filter inputs | Rowinf | 1,721 Kb |
WRENCH - STAFF | Lolita-adams | 1,608 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!