How to Create: Loading Button
- Previous Page Read More/Read Less
- Next Page Download Button
Learn how to create loading buttons using CSS.
How to Set Loading Button Styles
Step 1 - Add HTML:
Add an icon library, such as Font Awesome, and attach icons to the HTML button:
<!-- Add icon library --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- Add Font Awesome icon to the button (note that the fa-spin class will rotate the icon) --> <button class="buttonload"> <i class="fa fa-spinner fa-spin"></i>Loading </button> <button class="buttonload"> <i class="fa fa-circle-o-notch fa-spin"></i>Loading </button> <button class="buttonload"> <i class="fa fa-refresh fa-spin"></i>Loading </button>
Step 2 - Add CSS:
/* Set button styles */ .buttonload { background-color: #04AA6D; /* Green background */ border: none; /* Remove border */ color: white; /* White text */ padding: 12px 16px; /* Some inner padding */ font-size: 16px /* Set font size */ }
Related Page
Tutorial:Icon Tutorial
Tutorial:CSS Button
Tutorial:How to Create CSS Loader
- Previous Page Read More/Read Less
- Next Page Download Button