日期:2014-05-17  浏览次数:20660 次

用CSS3设置text元素的大小写

下面的例子展示了你如何设置capitalization,通过text-transform样式。

text-transform样式接收下面的值。

capitalize-首字母大写

uppercase-所有字母大写

lowercase-所有字母小写

none-无

?

<!DOCTYPE html>
<html>
<head>
    <title>Setting the text capitalization on a text element in CSS</title>
</head>
<body>
 
    <div style="text-transform:none;">1) The quick brown fox jumps over the lazy dog.</div>
    <div style="text-transform:capitalize;">2) The quick brown fox jumps over the lazy dog.</div>
    <div style="text-transform:lowercase;">3) The quick brown fox jumps over the lazy dog.</div>
    <div style="text-transform:uppercase;">4) The quick brown fox jumps over the lazy dog.</div>
 
</body>
</html>

?源码下载 :

?setting-the-text-capitalization-on-a-text-element-in-css.zip

?