Home > Web Front-end > CSS Tutorial > How to use css text-transform attribute

How to use css text-transform attribute

silencement
Release: 2019-05-27 14:32:43
Original
4016 people have browsed it

How to use css text-transform attribute

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".

How to use css text-transform attribute

Example, convert text in different elements

h1 {
text-transform:uppercase
}
h2 {
text-transform:capitalize
}
p {
text-transform:lowercase
}
Copy after login

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

How to use css text-transform attribute


# #

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template