- 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 loading buttons with CSS?
Following is the code to create loading buttons with CSS −
Example
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> button { background-color: rgb(60, 24, 126); border: none; outline: none; color: white; padding: 12px 24px; font-size: 26px; } h1{ font-size: 50px; font-family: monospace,sans-serif,serif; } i { margin-left: -12px; margin-right: 8px; } </style> </head> <body> <h1>Loading Buttons Example</h1> <button><i class="fa fa-spinner fa-spin"></i>Loading</button> <button><i class="fa fa-circle-o-notch fa-spin"></i>Loading</button> <button><i class="fa fa-refresh fa-spin"></i>Loading</button> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- How to create fading buttons with CSS?
- How to create pill buttons with CSS?
- How to create notification buttons with CSS?
- How to create icon buttons with CSS?
- Create Hoverable Buttons with CSS
- How to create "next" and "previous" buttons with CSS?
- How to create custom checkboxes and radio buttons with CSS?
- How to style "alert" buttons with CSS?
- How to style outline buttons with CSS?
- How to style download buttons with CSS?
- How to style text buttons with CSS?
- How to style round buttons with CSS?
- How to style social media buttons with CSS?
- How to style block buttons (full-width) with CSS?
- How to Create Text Reveal Effect for Buttons using HTML and CSS?

Advertisements