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>
- capitalize:文本中的每个单词以大写字母开头
- uppercase:大写
- lowercase:小写
本文来自博客园,作者:叶子玉,转载请注明原文链接:https://www.cnblogs.com/knuzy/p/9877919.html