Metro style loading animation in pure CSS
How do I make an metro style loading animation in pure css?
Prefix-free loading animation, inspired by Metro and Windows 8. What is a metro style loading animation in pure css? How do you make a metro style loading animation in pure css? This script and codes were developed by Girish Sharma on 02 August 2022, Tuesday.
Metro style loading animation in pure CSS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Metro style loading animation in pure CSS</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <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! */ /** * This work is licensed under the Creative Commons * Attribution 3.0 Unported License. To view a copy * of this license, visit http://creativecommons.org/licenses/by/3.0/. * * Author: Girish Sharma <[email protected]> */
/* Demo specific styles begin */
* {margin: 0; padding: 0;}
body { background: #eee;
}
.loader { top: 50%;
}
/* Demo specific styles end */
/* Loader with three blocks */
.loader, .loader:before, .loader:after { display: inline-block; width: 100%; height: 10px; position: absolute; z-index: 100000; animation: loading 4s cubic-bezier(.1,.85,.9,.15) infinite, loading-opacity 2s ease-in-out infinite alternate; background: linear-gradient(to right, teal 0px, teal 10px, transparent 10px) no-repeat 0px 0px / 10px 10px; content: ' ';
}
.loader { animation-delay: .1s;
}
.loader:after { animation-delay: .2s;
}
@keyframes loading-opacity { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes loading { 0% { background-position: -50% 0px; } 100% { background-position: 150% 0px; }
}
/* 2 more loading blocks */
.loader.more:before, .loader.more:after { content: ' ■'; color: teal; top: 0; line-height: 6px; font-size: 22px; font-family: "Times New Roman"; vertical-align: top; animation: loading 4s cubic-bezier(.1,.85,.9,.15) infinite, loading-font 4s cubic-bezier(.1,.85,.9,.15) infinite !important;
}
.loader.more:before { animation-delay: 0s,.2s !important;
}
.loader.more { overflow: hidden; opacity: 0; animation: loading 4s cubic-bezier(.1,.85,.9,.15) infinite, loading-opacity 2s ease-in-out infinite alternate; animation-delay: .6s,.4s !important;
}
.loader.more:after { animation-delay: .4s,.8s !important;
}
@keyframes loading-font { 0% { text-indent: calc(-50% - 5px); } 100% { text-indent: calc(150% - 10px); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="loader more">
</div> <script src="js/index.js"></script>
</body>
</html>
Metro style loading animation in pure CSS - Script Codes CSS Codes
/** * This work is licensed under the Creative Commons * Attribution 3.0 Unported License. To view a copy * of this license, visit http://creativecommons.org/licenses/by/3.0/. * * Author: Girish Sharma */
/* Demo specific styles begin */
* {margin: 0; padding: 0;}
body { background: #eee;
}
.loader { top: 50%;
}
/* Demo specific styles end */
/* Loader with three blocks */
.loader, .loader:before, .loader:after { display: inline-block; width: 100%; height: 10px; position: absolute; z-index: 100000; animation: loading 4s cubic-bezier(.1,.85,.9,.15) infinite, loading-opacity 2s ease-in-out infinite alternate; background: linear-gradient(to right, teal 0px, teal 10px, transparent 10px) no-repeat 0px 0px / 10px 10px; content: ' ';
}
.loader { animation-delay: .1s;
}
.loader:after { animation-delay: .2s;
}
@keyframes loading-opacity { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes loading { 0% { background-position: -50% 0px; } 100% { background-position: 150% 0px; }
}
/* 2 more loading blocks */
.loader.more:before, .loader.more:after { content: ' ■'; color: teal; top: 0; line-height: 6px; font-size: 22px; font-family: "Times New Roman"; vertical-align: top; animation: loading 4s cubic-bezier(.1,.85,.9,.15) infinite, loading-font 4s cubic-bezier(.1,.85,.9,.15) infinite !important;
}
.loader.more:before { animation-delay: 0s,.2s !important;
}
.loader.more { overflow: hidden; opacity: 0; animation: loading 4s cubic-bezier(.1,.85,.9,.15) infinite, loading-opacity 2s ease-in-out infinite alternate; animation-delay: .6s,.4s !important;
}
.loader.more:after { animation-delay: .4s,.8s !important;
}
@keyframes loading-font { 0% { text-indent: calc(-50% - 5px); } 100% { text-indent: calc(150% - 10px); }
}
Metro style loading animation in pure CSS - Script Codes JS Codes
/** * Prefix-free loading animation, * inspired by Metro and Windows 8 */
Developer | Girish Sharma |
Username | grssam |
Uploaded | August 02, 2022 |
Rating | 4.5 |
Size | 3,237 Kb |
Views | 167,992 |
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 Girish Sharma | 1,618 Kb |
More loader dots in pure CSS and single HTML element | 2,685 Kb |
XBox SmartGlass Loading Animation in CSS using 1 element | 2,183 Kb |
Horizontal 3D spinner in pure CSS | 2,642 Kb |
Fractal Snow Flake | 2,092 Kb |
Google Canary icon in pure CSS | 3,981 Kb |
Gmail like loading animation in pure CSS | 2,845 Kb |
Google browser icon set in Pure CSS | 4,733 Kb |
Single DIV Loading ring in Pure CSS | 3,937 Kb |
Google Chrome Icon using Pure CSS in one DIV | 3,627 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 |
Ipad Mini Showcase | Hornebom | 10,479 Kb |
Canvas snow | Win7killer | 2,572 Kb |
Main page display | BarryKe | 4,562 Kb |
Sexy Social Buttons | Ipiyale | 2,226 Kb |
A Pen by Final Boss tommyb9 | FBtommyb9 | 55,354 Kb |
Highbrow Basic HTML Lesson 7 | Kimlarocca | 1,662 Kb |
IE11 Test | Boostnewmedia | 4,998 Kb |
Playing with transition timing | Mattgrosswork | 1,993 Kb |
Three js | Paulq | 2,353 Kb |
Day 1 - Portfolio | Chpecson | 3,532 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!