使用 CSS 縮排段落的第一行


使用 text-indent 屬性可縮排段落的第一行。可能值為 % 或指定縮排空格數目的數值。

示例

您可以嘗試執行以下程式碼以縮排第一行

<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>

更新日期:31-Jan-2020

3K+ 瀏覽

開啟您的 職業生涯

完成課程獲得認證

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