Hoe OM - Sosiale media-knoppies
Leer hoe om sosiale media-knoppies met CSS te styl.
Hoe om sosiale media-knoppies te styl
Stap 1) Voeg HTML by:
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 -->
<a href="#" class="fa fa-facebook"></a>
<a href="#" class="fa fa-twitter"></a>
...
Stap 2) Voeg CSS by:
Vierkant voorbeeld
/* Style all font awesome icons */
.fa {
padding: 20px;
font-size: 30px;
width: 50px;
text-align: center;
text-decoration: none;
}
/* Add a hover effect if you want */
.fa:hover {
opacity: 0.7;
}
/* Set a specific color for each brand */
/* Facebook */
.fa-facebook
{
background: #3B5998;
color:
white;
}
/* Twitter */
.fa-twitter {
background:
#55ACEE;
color: white;
}
Ronde knoppies
Wenk: Voeg border-radius:50%
by om ronde knoppies te skep, en verminder die width
:
Afgeronde voorbeeld
.fa {
padding: 20px;
font-size: 30px;
width: 30px;
text-align: center;
text-decoration: none;
border-radius: 50%;
}
Wenk: Gaan na ons ikone-tutoriaal om meer oor ikone te wete te kom.
Gaan na ons CSS-knoppie-tutoriaal om meer te wete te kom oor hoe om knoppies te styl.