Hoe OM - Laai knoppies
Leer hoe om laaiknoppies met CSS te skep.
Hoe om laaiknoppies te styl
Stap 1) Voeg HTML by:
Voeg 'n ikoonbiblioteek, soos Font Awesome, by en voeg ikone by HTML-knoppies:
Voorbeeld
<!-- 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 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>
<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>
Stap 2) Voeg CSS by:
Voorbeeld
/* Style buttons */
.buttonload {
background-color: #04AA6D; /* Green background */
border: none; /* Remove borders */
color: white; /*
White text */
padding: 12px 16px; /* Some padding */
font-size: 16px /* Set a font size */
}
Wenk: Gaan na ons ikone-tutoriaal om meer oor ikone te wete te kom.
Wenk: Gaan na ons How To - CSS Loader om te leer hoe om 'n laaier met CSS te skep (sonder 'n ikoonbiblioteek).
Gaan na ons CSS-knoppie-tutoriaal om meer te wete te kom oor hoe om knoppies te styl.