使用 CSS 對齊文字的最後一行


text-align-last 屬性用於對齊文字的最後一行。你可以嘗試執行以下程式碼,使用 CSS 對齊文字的最後一行

示例

即時演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         .mydiv {
            text-align-last: right;
         }
      </style>
   </head>
   <body>
      <h1>text-align-last Property</h1>
      <div class = "mydiv">
         <p>This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text.</p>
      </div>
   </body>
</html>

輸出

更新時間:20-6-2020

284 個瀏覽量

啟動您的職業生涯

透過完成該課程獲取認證

開始
廣告
© . All rights reserved.