使用 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