css text-transform 属性

 1 <html>
 2 
 3 <head>
 4 <style type="text/css">
 5   h1 {text-transform: uppercase}
 6   p.uppercase {text-transform: uppercase}
 7   p.lowercase {text-transform: lowercase}
 8   p.capitalize {text-transform: capitalize}
 9 </style>
10 </head>
11 
12 <body>
13 <h1>This Is An H1 Element</h1>
14 <p class="uppercase">This is some text in a paragraph.</p>
15 <p class="lowercase">This is some text in a paragraph.</p>
16 <p class="capitalize">This is some text in a paragraph.</p>
17 </body>
18 
19 </html>
  1. capitalize:文本中的每个单词以大写字母开头
  2. uppercase:大写
  3. lowercase:小写
posted @ 2018-10-30 17:04  叶子玉  阅读(309)  评论(0编辑  收藏  举报