Comment - Boutons de notification
Apprenez à créer des boutons de notification avec CSS.
Boîte de réception 3
Comment créer un bouton de notification
Étape 1) Ajoutez du HTML :
Exemple
<a href="#" class="notification">
<span>Inbox</span>
<span
class="badge">3</span>
</a>
Étape 2) Ajoutez CSS :
Exemple
.notification {
background-color: #555;
color: white;
text-decoration: none;
padding: 15px 26px;
position:
relative;
display: inline-block;
border-radius: 2px;
}
.notification:hover
{
background: red;
}
.notification .badge {
position:
absolute;
top: -10px;
right: -10px;
padding: 5px
10px;
border-radius: 50%;
background: red;
color: white;
}
Accédez à notre didacticiel sur les boutons CSS pour en savoir plus sur la façon de styliser les boutons.