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
SVG Circular Loader Using HTML and CSS
HTML
CSS
JS
Output
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>SVG Circular Loader Using HTML and CSS</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:ital@1&display=swap"> </head> <body> <div class="circleTitle-container"> <h1 class="heading">SVG Circular Loader Using HTML and CSS</h1> <div class="spinnerArea"> <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <circle cx="50" cy="50" r="46" /> </svg> </div> <h1 class="circleTitle">loading...</h1> </div> </body> </html>
CSS
body { background: rgb(11, 8, 32); background: linear-gradient(322deg, rgb(24, 6, 19) 20%, rgb(37, 19, 78) 100%); } .heading { color: #fff; } .circleTitle { display: flex; justify-content: center; color: #f540f5; font-family: Poppins; user-select: none; text-shadow: 3px 3px black; } .circleTitle-container { text-align: center; display: flex; flex-direction: column; justify-content: center; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .spinnerArea { display: flex; justify-content: center; } svg { width: 50%; max-width: 10rem; animation: rotate 3.6s linear infinite; } circle { fill: none; stroke: #9440f5; stroke-width: 8px; stroke-dasharray: 300; animation: circleOutline 2s cubic-bezier(0.77, 0, 0.18, 1) infinite; } @keyframes circleOutline { 0% { stroke-dashoffset: 0; } 50% { stroke-dashoffset: 300; } 100% { stroke-dashoffset: 600; } } @keyframes rotate { from { transform: rotate(0turn); } to { transform: rotate(-1turn); } }
JS
Output