再日常项目中可能会用到一些特殊的样式,比如大写字母转小写、小写字母转大写、首字母大写等。

可以通过 css 的 text-transform 属性来实现:

 

text-transform 转换不同的文本

属性值:

none 带有小写字母和大写字母的标准的文本(默认属性)。

capitalize 首字母大写。

uppercase 字母大写。

lowercase 字母小写。

inherit 从父元素继承。

广州vi设计公司 http://www.maiqicn.com 我的007办公资源网 https://www.wode007.com

示例:

h1 {text-transform:uppercase}
h2 {text-transform:capitalize}
p {text-transform:lowercase}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-14
  • 2021-06-19
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案