Propriété CSS text-transform
Exemple
Transformez le texte en différents éléments <div> :
div.a {
text-transform: uppercase;
}
div.b {
text-transform: lowercase;
}
div.c {
text-transform: capitalize;
}
Définition et utilisation
La text-transform
propriété contrôle la capitalisation du texte.
Valeur par défaut: | rien |
---|---|
Hérité: | Oui |
Version: | CSS1 |
Syntaxe JavaScript : | objet .style.textTransform="majuscule" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Property | |||||
---|---|---|---|---|---|
text-transform | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Syntaxe CSS
text-transform: none|capitalize|uppercase|lowercase|initial|inherit;
Valeurs de propriété
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 |
Pages connexes
Tutoriel CSS : Texte CSS
Référence HTML DOM : propriété textTransform