使用 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 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.