控制文本中字母的大小写
实例解析:
text-transform属性可以控制文本中字母的大小写。
可以设置:
● capitalize:文本中的每个单词以大写字母开头。
● uppercase: 定义仅有大写字母。
● lowercase: 定义仅有小写字母。
新建文件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文网(php.cn)</title>
<style>
p.uppercase {text-transform:uppercase;}
p.lowercase {text-transform:lowercase;}
p.capitalize {text-transform:capitalize;}
</style>
</head>
<body>
<p class="uppercase">This is some text.</p>
<p class="lowercase">This is some text.</p>
<p class="capitalize">This is some text.</p>
</body>
</html>
预览
Clear
- 课程推荐
- 课件下载
课件暂不提供下载,工作人员正在整理中,后期请多关注该课程~ 















