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