Propriedade de transformação de texto CSS
Exemplo
Transforme o texto em diferentes elementos <div>:
div.a {
text-transform: uppercase;
}
div.b {
text-transform: lowercase;
}
div.c {
text-transform: capitalize;
}
Definição e uso
A text-transform
propriedade controla a capitalização do texto.
Valor padrão: | Nenhum |
---|---|
Herdado: | sim |
Versão: | CSS1 |
Sintaxe JavaScript: | objeto .style.textTransform="maiúsculas" |
Suporte ao navegador
Os números na tabela especificam a primeira versão do navegador que oferece suporte total à propriedade.
Property | |||||
---|---|---|---|---|---|
text-transform | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Sintaxe CSS
text-transform: none|capitalize|uppercase|lowercase|initial|inherit;
Valores de propriedade
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 |
Páginas relacionadas
Tutorial CSS: Texto CSS
Referência HTML DOM: propriedade textTransform