How TO - Schaltflächen laden
Erfahren Sie, wie Sie mit CSS Ladeschaltflächen erstellen.
So stylen Sie Ladeschaltflächen
Schritt 1) HTML hinzufügen:
Fügen Sie eine Symbolbibliothek wie Font Awesome hinzu und hängen Sie Symbole an HTML-Schaltflächen an:
Beispiel
<!-- 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>
Schritt 2) CSS hinzufügen:
Beispiel
/* 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 */
}
Tipp: Besuchen Sie unser Symbol-Tutorial , um mehr über Symbole zu erfahren.
Tipp: Gehen Sie zu unserem How To - CSS Loader , um zu erfahren, wie Sie einen Loader mit CSS (ohne Symbolbibliothek) erstellen.
Gehen Sie zu unserem CSS-Schaltflächen-Tutorial , um mehr über das Gestalten von Schaltflächen zu erfahren.