textTransform 属性设置或返回文本的大小写。
此属性用于将文本更改为大写、小写或大写。
Property | |||||
---|---|---|---|---|---|
textTransform | Yes | Yes | Yes | Yes | Yes |
返回 textTransform 属性:
object.style.textTransform
设置 textTransform 属性:
object.style.textTransform = "none|capitalize|uppercase|lowercase|initial|inherit"
Value | Description |
---|---|
none | No characters are transformed. This is default |
capitalize | The first character of each word is transformed to uppercase |
uppercase | All characters are transformed to uppercase |
lowercase | All characters are transformed to lowercase |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
默认值: | 没有任何 |
---|---|
返回值: | 一个字符串,表示元素中文本的转换 |
CSS版本 | CSS1 |
CSS教程:CSS 文本
CSS 参考:文本转换属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!