Gmail like loading animation in pure CSS
How do I make an gmail like loading animation in pure css?
This animation is similar to what GMail shows at the starting of loading one's email id. This animation is made purely in CSS and using just one element so it can be used on any DOM element by just toggling the class. Just a fun note, GMail only shows the inner stripes animation on Chrome, but not on Firefox. Here is a POC that it is possible :). What is a gmail like loading animation in pure css? How do you make a gmail like loading animation in pure css? This script and codes were developed by Girish Sharma on 02 August 2022, Tuesday.
Gmail like loading animation in pure CSS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Gmail like loading animation in pure CSS</title> <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! */ /* Demo specific styles begin */
body { background: rgb(245,245,245);
}
b { position: absolute; top: calc(50% - 26px); left: 50%; transform: translateX(-50%); font-family: arial,sans-serif;
}
.loader-gmail { position: absolute; top: calc(50% - 6px); left: calc(50% - 160px);
}
a { font-family: arial,sans-serif; font-weight: 600; font-size: 0.9rem; text-decoration: none; position: fixed; bottom: 0; right: 0; margin: 5px; color: #333;
}
a:hover { color: #777;
}
/* Demo specific styles end */
.loader-gmail { border: 1px solid #a4a4a4; width: 320px; height: 8px; background-image: linear-gradient(135deg, #6187f2 0%, #6187f2 25%, #5679da 25%, #5679da 50%, #6187f2 50%, #6187f2 75%, #5679da 75%, #5679da 100%); background-repeat: repeat; background-position: 0px 0px; background-size: 16px 16px; background-clip: content-box; padding: 1px; animation: loading 1s linear infinite;
}
.loader-gmail:after { position: absolute; right: 0; height: 8px; background: rgb(245,245,245); z-index: 20; animation: progress 4s ease-in-out infinite; content: '';
}
@keyframes loading { from { background-position: 0px 0px; } to { background-position: -16px 0px; }
}
@keyframes progress { 0% { min-width: 100%; } 30% { min-width: 80%; } 50% { min-width: 65%; } 69% { min-width: 20%; } 85% { min-width: 0; } 100% { min-width: 0; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <b>Loading [email protected]...</b>
<div class="loader-gmail"></div>
<a href="http://codepen.io/collection/khwrE">See my other interesting loaders in pure CSS</a>
</body>
</html>
Gmail like loading animation in pure CSS - Script Codes CSS Codes
/* Demo specific styles begin */
body { background: rgb(245,245,245);
}
b { position: absolute; top: calc(50% - 26px); left: 50%; transform: translateX(-50%); font-family: arial,sans-serif;
}
.loader-gmail { position: absolute; top: calc(50% - 6px); left: calc(50% - 160px);
}
a { font-family: arial,sans-serif; font-weight: 600; font-size: 0.9rem; text-decoration: none; position: fixed; bottom: 0; right: 0; margin: 5px; color: #333;
}
a:hover { color: #777;
}
/* Demo specific styles end */
.loader-gmail { border: 1px solid #a4a4a4; width: 320px; height: 8px; background-image: linear-gradient(135deg, #6187f2 0%, #6187f2 25%, #5679da 25%, #5679da 50%, #6187f2 50%, #6187f2 75%, #5679da 75%, #5679da 100%); background-repeat: repeat; background-position: 0px 0px; background-size: 16px 16px; background-clip: content-box; padding: 1px; animation: loading 1s linear infinite;
}
.loader-gmail:after { position: absolute; right: 0; height: 8px; background: rgb(245,245,245); z-index: 20; animation: progress 4s ease-in-out infinite; content: '';
}
@keyframes loading { from { background-position: 0px 0px; } to { background-position: -16px 0px; }
}
@keyframes progress { 0% { min-width: 100%; } 30% { min-width: 80%; } 50% { min-width: 65%; } 69% { min-width: 20%; } 85% { min-width: 0; } 100% { min-width: 0; }
}
Developer | Girish Sharma |
Username | grssam |
Uploaded | August 02, 2022 |
Rating | 4.5 |
Size | 2,845 Kb |
Views | 123,464 |
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 |
Single DIV Loading ring in Pure CSS | 3,937 Kb |
Tilted Horizontal 3D spinner in pure CSS | 2,912 Kb |
Metro style loading animation in pure CSS | 3,237 Kb |
XBox SmartGlass Loading Animation in CSS using 1 element | 2,183 Kb |
Korean Flag in pure CSS | 1,784 Kb |
Google Chrome Icon using Pure CSS in one DIV | 3,627 Kb |
Horizontal 3D spinner in pure CSS | 2,642 Kb |
Facebook style loading animation in pure CSS | 2,769 Kb |
Metro style loading spinner animation in pure CSS | 2,820 Kb |
Google Plus loading animation in pure CSS | 4,572 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 |
Css3 loader | Clknap | 2,391 Kb |
Animated Vertical CSS3 Menu Black | MaCeLMp4 | 2,750 Kb |
Calculator | Rzencoder | 4,572 Kb |
Basic template | Tomcat | 1,675 Kb |
Testing Portfolio Page | Sideshowli | 3,395 Kb |
Material design buttons | Fischaela | 4,381 Kb |
Shopping cart | Andiio | 6,581 Kb |
Shopping List | Markmurray | 6,015 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
Whyutils | LeYvan | 3,752 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!