How TO - Meldingsknoppen
Leer hoe u meldingsknoppen maakt met CSS.
Postvak IN 3
Een meldingsknop maken
Stap 1) HTML toevoegen:
Voorbeeld
<a href="#" class="notification">
<span>Inbox</span>
<span
class="badge">3</span>
</a>
Stap 2) CSS toevoegen:
Voorbeeld
.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;
}
Ga naar onze zelfstudie CSS-knoppen voor meer informatie over het opmaken van knoppen.