使用 CSS 将文本转换为小写
要使用 CSS 将文本转换为小写,我们将使用 text-transform 属性的小写值。
示例
在此示例中,我们使用了 **text-transform** 属性,并使用 p 标记显示转换前后的结果。
<html>
<head>
<style>
#lcase{
text-transform:lowercase;
}
</style>
</head>
<body>
<h3>
Convert Text to Lowercase with CSS
</h3>
<p>
In this example we have used <strong>text-
transform</strong> property to convert the
text to lowercase.
</p>
<hr>
<p>This is a NORMAL text with Mixed CASes.</p>
<h4>After Conversion to Lower Case:</h4>
<p id="lcase">
This is a NORMAL text with lower CASe.
</p>
</body>
</html>
结论
为了在本文中使用 CSS 将文本转换为小写,我们使用了 **text-transform** 属性。仅在使用 CSS 时,我们才有此方法可用。
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程语言
C++
C#
MongoDB
MySQL
Javascript
PHP