Proprietà CSS di trasformazione del testo
Esempio
Trasforma il testo in diversi elementi <div>:
div.a {
text-transform: uppercase;
}
div.b {
text-transform: lowercase;
}
div.c {
text-transform: capitalize;
}
Definizione e utilizzo
La text-transform
proprietà controlla la capitalizzazione del testo.
Valore di default: | nessuno |
---|---|
Ereditato: | sì |
Versione: | CSS1 |
sintassi JavaScript: | oggetto .style.textTransform="maiuscolo" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
text-transform | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Sintassi CSS
text-transform: none|capitalize|uppercase|lowercase|initial|inherit;
Valori di proprietà
Value | Description | Play it |
---|---|---|
none | No capitalization. The text renders as it is. This is default | |
capitalize | Transforms the first character of each word to uppercase | |
uppercase | Transforms all characters to uppercase | |
lowercase | Transforms all characters to lowercase | |
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à textTransform