zoukankan      html  css  js  c++  java
  • CSS text-transform 属性——转换文本的大小写格式

    可能的值

    描述
    none 默认。定义带有小写字母和大写字母的标准的文本。
    capitalize 文本中的每个单词以大写字母开头。
    uppercase 定义仅有大写字母。
    lowercase 定义无大写字母,仅有小写字母。
    inherit

    规定应该从父元素继承 text-transform 属性的值。

    <html>

    <head>
    <style type="text/css">
      h1 {text-transform: uppercase}
      p.uppercase {text-transform: uppercase}
      p.lowercase {text-transform: lowercase}
      p.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>
    <p class="capitalize">This is some text in a paragraph.</p>
    </body>

    </html>

    查看结果:

    This Is An H1 Element

    This is some text in a paragraph.

    This is some text in a paragraph.

    This is some text in a paragraph.

  • 相关阅读:
    Map和Set
    js基本语法入门
    js中变量的作用域,let,const详解
    循环结构
    方法
    只有分享才能一起进步
    培训随笔
    得食相呼,义也
    Wall.e
    《国学之大智慧》观感
  • 原文地址:https://www.cnblogs.com/liuyanxia/p/5659278.html
Copyright © 2011-2022 走看看