Definition and Usage
The text-transform property controls the case of text.
Description
This attribute will change the case of letters in the element, regardless of the case of the text in the source document. If the value is capitalize, some letters are capitalized, but it is not clearly defined how to determine which letters are capitalized, it is up to the user agent to recognize the individual "words".
Example, convert text in different elements
h1 { text-transform:uppercase } h2 { text-transform:capitalize } p { text-transform:lowercase }
Tips and notes
Notes: Different user agents may use different methods to determine where a word begins and, accordingly, which letters to capitalize. For example, the text "w3-school" can be displayed in two ways: "W3-school" and "W3-School". CSS doesn't specify which one is correct, so both are fine.
Possible values
# #
The above is the detailed content of How to use css text-transform attribute. For more information, please follow other related articles on the PHP Chinese website!