如何使用 CSS 設定文字的大小寫?


使用 text-transform 屬性設定文字的大小寫。可能的值有:none、capitalize、uppercase、lowercase。

示例

您可以嘗試執行以下程式碼,設定文字的大小寫

<html>
   <head>
   </head>
   <body>
      <p style = "text-transform:capitalize;">
         This will be capitalized
      </p>

      <p style = "text-transform:uppercase;">
         This will be in uppercase
      </p>

      <p style = "text-transform:lowercase;">
         This will be in lowercase
      </p>
   </body>
</html>

更新於:2020-01-31

167 次瀏覽

開啟你的 職業生涯

完成課程可獲得認證

開始
廣告
© . All rights reserved.