使用 CSS 設定標籤字元的寬度


使用 CSS 中的 tab-size 屬性設定標籤字元的寬度。你可以嘗試執行以下程式碼來實現 tab-size 屬性

示例

現場演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         #demo {
            tab-size: 12;
         }
      </style>
   </head>
   <body>
      <h1>The tab-size Property</h1>
      <pre id = "demo">
         This is demo text.
      </pre>
   </body>
</html>

更新時間: 25-Jun-2020

127 次瀏覽

開啟您的 職業生涯

透過完成課程獲得認證

立即開始
廣告
© . All rights reserved.