How TO - Loading Buttons

Learn how to create loading buttons with CSS.

How To Style Alert Buttons

Step 1) Add HTML:

Add an icon library, such as font awesome and append icons to HTML buttons:


<!-- Add icon library -->
<link rel="stylesheet" href="">

<!-- Add font awesome icons to buttons (note that the fa-spin class rotates the icon) -->
<button class="buttonload">
  <i class="fa fa-spinner fa-spin"></i>Loading

<button class="buttonload">
  <i class="fa fa-circle-o-notch fa-spin"></i>Loading

<button class="buttonload">
  <i class="fa fa-refresh fa-spin"></i>Loading

Step 2) Add CSS:


/* Style buttons */
.buttonload {
    background-color: #F78628; /* Green background */
    border: none; /* Remove borders */
    color: white; /* White text */
    padding: 12px 16px; /* Some padding */
    font-size: 16px /* Set a font size */
Try it Yourself »

Tip: Go to our Icons Tutorial to learn more about icons.

Tip: Go to our How To - CSS Loader to learn how to create a loader with CSS (without an icon library).

Go to our CSS Buttons Tutorial to learn more about how to style buttons.