<html>
<head>
<style type="text/css">
  h1 {text-transform: uppercase} /*全部大写*/
  p.uppercase {text-transform: uppercase} /*全部大写*/
  p.lowercase {text-transform: lowercase} /*全部小写*/
  div.capitalize {text-transform: capitalize} /*首字母大写*/
</style>
</head>
<body>
<h1>This Is An H1 Element</h1>
<p class="uppercase">This is some text in a paragraph.</p>
<p class="lowercase">This is some text in a paragraph.</p>
<div class="capitalize">This is some text in a paragraph.</div>
</body>
</html>
text-transform: uppercase; /**单行范例**/
描述
none 默认。定义带有小写字母和大写字母的标准的文本。
capitalize 文本中的每个单词以大写字母开头。
uppercase 定义仅有大写字母。
lowercase 定义无大写字母,仅有小写字母。
inherit 规定应该从父元素继承 text-transform 属性的值。

何星星原创文章仅用于个人学习,当前页面暂不支持复制操作,了解详情或文章转载请 点此 继续!
分类: 前端开发

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用*标注