Proprietà spaziatura lettere CSS
Esempio
Imposta la spaziatura delle lettere per gli elementi <h1>, <h2> e <h3>:
h1 {
letter-spacing: 3px;
}
h2 {
letter-spacing: 2px;
}
h3 {
letter-spacing:
-1px;
}
Definizione e utilizzo
La letter-spacing
proprietà aumenta o diminuisce lo spazio tra i caratteri in un testo.
Valore di default: | normale |
---|---|
Ereditato: | sì |
Animabile: | sì. Leggi su animabile |
Versione: | CSS1 |
sintassi JavaScript: | oggetto .style.letterSpacing="3px" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
letter-spacing | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintassi CSS
letter-spacing: normal|length|initial|inherit;
Valori di proprietà
Value | Description | Play it |
---|---|---|
normal | No extra space between characters. This is default | |
length | Defines an extra space between characters (negative values are allowed). Read about length units | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Pagine correlate
Tutorial CSS: testo CSS
Riferimento HTML DOM: proprietà letterSpacing