text-transform property Introduction
text-transform
Property is to set theHTML
page label inside the text case,text-transform
common attribute value of the property, there are three:capitalize
, ,uppercase
,lowercase
unusual property values will not be setting them out in this author.
text-transform Property Value Description Table
Property Value | description |
---|---|
none | default. Defined text with lowercase and uppercase letters standards. |
capitalize | The first letter of the English alphabet is set to uppercase. |
uppercase | The letters to uppercase. |
lowercase | The letters to lowercase. |
inherit | Provision should inherit the value of the text-transform property from the parent element. |
Set to capitalize the first letter capitalized.
Let us enter the
text-transform
property attribute iscapitalize
practice, practice content, such as: I willHTML
pageh2
the label text to uppercase first letter.-
Block
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>设置文本的大小写</title>
<style>
h2{
text-transform: capitalize;
}
</style>
</head>
<body>
<h2>success is not defeating others, but changing yourself</h2>
</body>
</html>
-
Results Figure
uppercase text to uppercase.
Let us enter the
text-transform
property attribute isuppercase
practice, practice content such as: authorHTML
pageh2
text labels in English lowercase to uppercase setting.-
Block
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>设置文本的大小写</title>
<style>
h2{
text-transform: uppercase;
}
</style>
</head>
<body>
<h2>success is not defeating others, but changing yourself</h2>
</body>
</html>
-
Results Figure
lowercase text to uppercase.
- Let us enter the
text-transform
property attribute islowercase
practice, practice content, such as: I willHTML
pageh2
the label text uppercase English to lowercase. -
Block
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>设置文本的大小写</title>
<style>
h2{
text-transform: lowercase;
}
</style>
</head>
<body>
<h2>SUCCESS IS NOT DEFEATING OTHERS, BUT CHANGING YOURSELF</h2>
</body>
</html>
-
Results Figure
to sum up
text-transform
Properties works only for English, do not support the Chinese Oh.