Propiedad de transformación de texto CSS
Ejemplo
Transforma texto en diferentes elementos <div>:
div.a {
text-transform: uppercase;
}
div.b {
text-transform: lowercase;
}
div.c {
text-transform: capitalize;
}
Definición y uso
La text-transform
propiedad controla las mayúsculas del texto.
Valor por defecto: | ninguna |
---|---|
Heredado: | sí |
Versión: | CSS1 |
Sintaxis de JavaScript: | objeto .style.textTransform="mayúsculas" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
text-transform | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Sintaxis CSS
text-transform: none|capitalize|uppercase|lowercase|initial|inherit;
Valores de propiedad
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
Referencia HTML DOM: propiedad textTransform