Mon - Sun 8.00 AM - 8.00 PM
[email protected]
Home
Articles
Our Courses
HTML 5
CSS
JavaScript
MySql
PHP
Laravel
Bootstrap
Our Tutorials
PHP
JavaScript
HTML
Laravel
MySQL
JQuery
CSS
Git
Bootstrap
Vue JS
Android
Ui Code Snippets
Chat Box
Range Slider
Radio Button
Select Box
Nav Bar
Other
Testimonial
Carousel
Logo
Loader
Lightbox
Login Form
Modals
OTP Verification Form
Popular Notes
HTML
CSS
JavaScript
SQL
Services
About
Contact Us
Ui Code
Snippets
Colorfull Loading Spinner Using HTML and CSS
HTML
CSS
JS
Output
HTML
<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Colorfull Loading Spinner Using HTML and CSS</title> </head> <body> <section> <h1 class="mainHeading">Colorfull Loading Spinner Using HTML and CSS</h1> <div class="mainDiv"> <div class="spinner-div"></div> </div> </body> </html>
CSS
* { margin: 0; padding: 0; box-sizing: border-box; } body { height: 100vh; display: flex; justify-content: center; align-items: center; } .mainHeading { color: rgb(6, 2, 114); text-align: center; } .mainDiv { display: flex; justify-content: center; margin-top: 1rem; } .spinner-div { box-sizing: border-box; position: relative; margin: auto; width: 128px; aspect-ratio: 1/1; border-radius: 50%; border: 16px solid transparent; border-top-color: #006eff; border-bottom-color: #00ff55; transform: rotateZ(-45deg); animation: SuperSpinerAnimation 5s linear infinite; } .spinner-div::after { box-sizing: border-box; content: ""; position: absolute; inset: -16px; aspect-ratio: 1/1; border-radius: 50%; border: 16px solid transparent; border-right-color: #6f00ff; border-left-color: #00f7ff; animation: SuperSpinerAnimation 5s linear infinite; } @keyframes SuperSpinerAnimation { 0% { transform: rotateZ(0deg); } 25% { transform: rotateZ(360deg); } 75% { transform: rotateZ(720deg); } 100% { transform: rotateZ(1080deg); } }
JS
Output