- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a preloader with CSS?
To create a preloader with CSS, the code is as follows −
Example
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } .loader { border: 16px double #ffee00; border-radius: 50%; border-top: 16px solid #7434db; width: 140px; height: 140px; -webkit-animation: loader 2s linear infinite; /* Safari */ animation: loader 2s linear infinite; } @-webkit-keyframes loader { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> </head> <body> <h1>Creating a pre Loader example</h1> <div class="loader"></div> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- How to create a pagination with CSS?
- How to create a Calendar with CSS?
- How to create a "card" with CSS?
- How to create a "coupon" with CSS?
- How to create a transition effect with CSS?
- How to create a Menu Icon with CSS?
- How to create a Hoverable Sidenav with CSS?
- How to create a vertical menu with CSS?
- How to create a "fixed" menu with CSS?
- How to create a subnavigation menu with CSS?
- How to create a dropup menu with CSS?
- How to create a breadcrumb navigation with CSS?
- How to create a "button group" with CSS?
- How to create a responsive header with CSS?
- How to create a Hero Image with CSS?

Advertisements