使用 CSS 來控制文字的流和格式


 空白屬性用於控制文字的流和格式。

示例

你可以嘗試執行以下程式碼,使用空白屬性來控制文字流

<html>
   <head>
   </head>
   <body>
      <p style = "white-space:pre;">
         This text has a line break and the white-space pre setting tells the browser to honor
         it just like the HTML pre tag.</p>
   </body>
</html>

更新日期:2020 年 1 月 31 日

266 次瀏覽

開啟你的 職業

透過完成課程獲得認證

開始
廣告