css文本属性_文本转换(CSS属性)

css文本属性

句法 (Syntax)

text-transform 文字转换 : { { capitalize | 大写 | lowercase | 小写 | none | | uppercase | 大写 | inherit } 继承 } ; ;

描述 (Description)

This property controls if and how an element’s text content is capitalized.

此属性控制是否以及如何大写元素的文本内容。

(Example)

These style rules make h1 headings use only uppercase letters, while the first letter of each word in h2 headings will be uppercased:

这些样式规则使h1标题仅使用大写字母,而h2标题中每个单词的首字母将大写:

h1 {
  text-transform: uppercase;
}
h2 {
  text-transform: capitalize;
}

(Value)

  • capitalize capitalize
  • Transforms the first character in each word to uppercase; all other characters remain unaffected—they’re not transformed to lowercase, but will appear as written in the document
    将每个单词的第一个字符转换为大写; 所有其他字符均不受影响-它们不会转换为小写字母,但会按照文档中的文字显示
  • lowercase lowercase
  • Transforms all characters to lowercase
    将所有字符转换为小写
  • none none
  • Produces no capitalization effect at all
    完全不产生大写效果
  • uppercase uppercase
  • Transforms all characters to uppercase
    将所有字符转换为大写

翻译自: https://www.sitepoint.com/text-transform-css-property/

css文本属性

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值