text-transform CSS

text-transform  控制文本的大小写(只对英文起作用,对汉字无效)

Example:

<p class="p1">This is an HI Element</p>
<p class="p2">This is an HI Element</p>
<p class="p3">This is an HI Element</p>
<style type="text/css">
    .p1 {
      text-transform: uppercase;
    }
    .p2 {
      text-transform: lowercase;
    }
    .p3 {
      text-transform: capitalize;
    }
</style>

Result:

THIS IS AN HI ELEMENT
this is an hi element
This Is An HI Element

 

 

posted @ 2017-03-15 16:29  艾若菲  阅读(138)  评论(0编辑  收藏  举报