使用 CSS 調整段落文字的對齊方式


要對齊段落文字,請使用text-indent 屬性。

示例

可能的值是 % 或指定縮排空間的數字。您可以嘗試執行以下程式碼,使用 CSS 實現text-index 屬性

<html>
   <head>
   </head>
   <body>
      <p style = "text-indent:2cm;">
         This text will have first line indented by 2cm and this line will remain at
         its actual position this is done by CSS text-indent property.
      </p>
   </body>
</html>

更新於: 2020 年 1 月 31 日

439 次瀏覽

開啟你的 職業生涯

完成課程即可獲得認證

開始學習
廣告
© . All rights reserved.