CSS设置英文字母大小写
英文字母大小写转换,是非常实用的一个功能。
在CSS中通过英文段落的text-transform属性,来实现大小写的转换。
<span style="font-size:24px;"><html>
<head>
<title>
英文字母大小写
</title>
<style>
<!--
p{font-size:17px;}
p.one{text-transform:capitalize;}
p.two{text-transform:uppercase;}
p.three{text-transfrom:lowercase;}
-->
</style>
</head>
<body>
<p class="one">quick brown fox jumps over the lazy dog.</p>
<p class="two">quick brown fox jumps over the lazy dog.</p>
<p class="three">quick brown fox jumps over the lazy dog.</p>
</body>
</html>
</span>
如上代码,属性text-transform的属性值,当设置为capitalize时,单词的首字母都为大写,当设置为uppercase时,所有的字母都为大写,当设置为lowercase是,所有的字母都为小写。