Skip to content

text transform

ythy edited this page Sep 27, 2017 · 2 revisions

The text-transform CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.

/* Keyword values */
text-transform: capitalize;
text-transform: uppercase;
text-transform: lowercase;
text-transform: none;
text-transform: full-width;

/* Global values */
text-transform: inherit;
text-transform: initial;
text-transform: unset;

Syntax

  • capitalize
    Is a keyword forcing the first letter of each word to be converted to uppercase. Other characters are unchanged; that is, they retain their original case as written in the element's text. A letter is any Unicode character part of the Letter or Number general categories。
  • uppercase
    Is a keyword forcing all characters to be converted to uppercase.
  • lowercaseIs
    Is a keyword forcing all characters to be converted to lowercase.
  • none
    Is a keyword preventing the case of all characters to be changed.
  • full-width
    Is a keyword forcing the writing of a character, mainly ideograms and latin scripts inside a square, allowing them to be aligned in the usual East Asian scripts (like Chinese or Japanese).

Important

只是显示变化 用JQuery.val() 取值还是输入的字符 而不是显示的字符

Clone this wiki locally