top of page

Loading Buttons in CSS

To use the Font Awesome icons, add the following line inside the <head> section of your HTML page:

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">

Below is the example where we have 5 types of Loading Buttons:


Code:

<!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>
.buttonload {
  background-color: blue; 
  border: solid-black ; 
  color: yellow; 
  padding: 12px 24px; 
  font-size: 18px; 
}

/* Add a right margin to each icon */
.fa {
  margin-left: -12px;
  margin-right: 8px;
}
</style>
</head>
<body>

<h2>Loading Buttons in CSS</h2>

<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>

<button class="buttonload">
  <i class="fa fa-spinner fa-pulse"></i>Loading
</button>

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

</body>
</html>


Output:



For more Font Awesome icons visit - https://fontawesome.com/ . For more information or any queries related to this article, Contact us - www.thetechplatform.com or Social Platforms @thetechplatform



Resource: Wikipedia , W3school


The Tech Platform

0 comments

Recent Posts

See All

Σχόλια


bottom of page