如何在 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>

更新時間: 31-Jan-2020

167 次瀏覽

開啟你的事業

完成課程即可獲得認證

開始
廣告
© . All rights reserved.