English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
text-The transform CSS attribute controls the case of text.
The following table provides usage instructions and version history of this attribute, as well as the usage syntax of this attribute in JavaScript scripts.
Default value: | none |
---|---|
Applicable to: | All elements |
Inheritance: | Yes |
Animatable: | No.Please see Animation properties. |
Version: | CSS 1,2,3 |
JavaScript syntax: | object.style.textTransform="lowercase" |
The syntax of this attribute is as follows:
text-transform: capitalize | lowercase | none | uppercase | initial | inherit
The following examples demonstrate how to use text-transform attribute.
p { text-transform: capitalize; }Test see‹/›
The following table describes the values of this attribute.
Value | Description |
---|---|
capitalize | Convert the first character of each word to uppercase; other characters are not affected. |
lowercase | Convert all characters of each word to lowercase. |
uppercase | Convert all characters of each word to uppercase. |
none | No uppercase effect. Text is presented as it is. This is the default value. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated elements adopt the text of their parent element.-Values of the transform attribute. |
text-Browser compatibility of the transform attribute, the numbers in the following table represent the minimum version number of the browsers that support this attribute; all mainstream browsers support this attribute.
|
Please refer to the following tutorials:CSS text,CSS font.
Text-related attributes:letter-spacing,text-align,text-decoration,text-indent,text-overflow,text-shadow,white-space,word-spacing.