Facebook style loading animation in pure CSS

Developer
Size
2,769 Kb
Views
190,256

How do I make an facebook style loading animation in pure css?

This loading animation is inspired by Facebook's loading animation. This is written in pure CSS and can be used on any element by adding the class name.. What is a facebook style loading animation in pure css? How do you make a facebook style loading animation in pure css? This script and codes were developed by Girish Sharma on 02 August 2022, Tuesday.

Facebook style loading animation in pure CSS Previews

Facebook style loading animation in pure CSS - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Facebook style 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! */ /** * 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-fb { top: calc(50% - 5px); left: calc(50% - 5px); position: absolute !important;
}
/* Demo specific styles end */
/* Loader with three blocks */
.loader-fb, .loader-fb:before, .loader-fb:after { position: relative; display: inline-block; width: 20px; height: 50px; background-color: rgba(215,230,240,0.9); border: 1px solid rgb(215,230,240); z-index: 100000; content: ' '; margin-left: -5px; margin-right: -9px;
}
.loader-fb:before { top: -11px; left: -100%; animation: loading-fb .8s cubic-bezier(.4,.5,.6,1) infinite;
}
.loader-fb { animation: loading-fb-main .8s cubic-bezier(.4,.5,.6,1) .2s infinite;
}
.loader-fb:after { top: -11px; right: -100%; margin-top: 50%; animation: loading-fb .8s cubic-bezier(.4,.5,.6,1) .4s infinite;
}
@keyframes loading-fb { from { transform: scaleY(1.4); background-color: rgba(55,114,171,0.9); border: 1px solid rgb(55,114,171); }
}
@keyframes loading-fb-main { from { padding-top: 10px; padding-bottom: 10px; margin-top: -10px; background-color: rgba(55,114,171,0.9); border: 1px solid rgb(55,114,171); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="loader-fb"></div>
</body>
</html>

Facebook 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-fb { top: calc(50% - 5px); left: calc(50% - 5px); position: absolute !important;
}
/* Demo specific styles end */
/* Loader with three blocks */
.loader-fb, .loader-fb:before, .loader-fb:after { position: relative; display: inline-block; width: 20px; height: 50px; background-color: rgba(215,230,240,0.9); border: 1px solid rgb(215,230,240); z-index: 100000; content: ' '; margin-left: -5px; margin-right: -9px;
}
.loader-fb:before { top: -11px; left: -100%; animation: loading-fb .8s cubic-bezier(.4,.5,.6,1) infinite;
}
.loader-fb { animation: loading-fb-main .8s cubic-bezier(.4,.5,.6,1) .2s infinite;
}
.loader-fb:after { top: -11px; right: -100%; margin-top: 50%; animation: loading-fb .8s cubic-bezier(.4,.5,.6,1) .4s infinite;
}
@keyframes loading-fb { from { transform: scaleY(1.4); background-color: rgba(55,114,171,0.9); border: 1px solid rgb(55,114,171); }
}
@keyframes loading-fb-main { from { padding-top: 10px; padding-bottom: 10px; margin-top: -10px; background-color: rgba(55,114,171,0.9); border: 1px solid rgb(55,114,171); }
}
Facebook style loading animation in pure CSS - Script Codes
Facebook style loading animation in pure CSS - Script Codes
Home Page Home
Developer Girish Sharma
Username grssam
Uploaded August 02, 2022
Rating 3
Size 2,769 Kb
Views 190,256
Do you need developer help for Facebook style loading animation in pure CSS?

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!

Girish Sharma (grssam) Script Codes
Create amazing art & images 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!