Gewusst wie: Runde Knöpfe
Erfahren Sie, wie Sie runde Schaltflächen mit CSS gestalten.
So stylen Sie runde Knöpfe
Schritt 1) HTML hinzufügen:
Beispiel
<button class="button button1">2px</button>
<button class="button
button2">4px</button>
<button class="button button3">8px</button>
<button class="button button4">12px</button>
<button class="button
button5">50%</button>
Schritt 2) CSS hinzufügen:
Fügen Sie abgerundete Ecken zu einer Schaltfläche mit der border-radius
Eigenschaft hinzu:
Beispiel
.button {
background-color: #04AA6D;
border: none;
color: white;
padding: 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
}
.button1 {border-radius: 2px;}
.button2
{border-radius: 4px;}
.button3 {border-radius: 8px;}
.button4
{border-radius: 12px;}
.button5 {border-radius: 50%;}
Gehen Sie zu unserem CSS-Schaltflächen-Tutorial , um mehr über das Gestalten von Schaltflächen zu erfahren.