Analyze the usage and example tutorials of text-transform

零下一度
Release: 2017-06-19 11:24:13
Original
2716 people have browsed it

Syntax:
text-transform: none | capitalize | uppercase | lowercase
Parameters:
none : No transformation occurs
capitalize: Convert the first letter of each word to uppercase, and no conversion will occur
uppercase: Convert to uppercase
lowercase: Convert to lowercase
Instructions:
Retrieve or set the case of text inobject.
The corresponding script feature is textTransform. Please see other books I have written.

text-transform andfont-variantDifference

text-transform and font-variant can convert English text to upper and lower case. But the only function of font-variant is to convert English text into "small" uppercase text. Note that this is "small". Generally, the font-variantattributeis rarely used. For English case conversion, we use the text-transform attribute instead of the font-variant attribute.

Example

Edit

div { text-transform : none; } div { text-transform : capitalize; } div { text-transform : uppercase; } div { text-transform : lowercase; }
Copy after login

Note: 1. Use text-transform only for English and invalid for Chinese characters

2.Use text-transform You can use dreamweaver to see the instant effect

text-transform example

    text-transform_CSS参考手册_web前端开发参考手册系列  
  • 将每个单词的首字母转换成大写
    原 文: how do you do.
    转换后: how do you do.
  • 转换成大写
    原 文: how do you do.
    转换后: how do you do.
  • 转换成小写
    原 文: HOW ARE YOU.
    转换后: HOW ARE YOU.
Copy after login

The above is the detailed content of Analyze the usage and example tutorials of text-transform. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!