Come creare: etichetta
Impara come usare CSS per impostare lo stile dei tag.
SUCCESSO INFO AVVISO DANGER Altro
Come impostare lo stile dei tag
Primo passo - Aggiungi HTML:
<span class="label success">SUCCESSO</span> <span class="label info">INFO</span> <span class="label warning">AVVISO</span> <span class="label danger">DANGER</span> <span class="label other">Altro</span>
Secondo passo - Aggiungi CSS:
.label { color: white; padding: 8px; } .success {background-color: #04AA6D;} /* verde */ .info {background-color: #2196F3;} /* blu */ .warning {background-color: #ff9800;} /* arancione */ .danger {background-color: #f44336;} /* rosso */ .other {background-color: #e7e7e7; color: black;} /* grigio */