使用 CSS 設定段落的文字縮排


 text-indent 屬性用於縮排段落文字。可能的值有 % 或指定縮排大小的數字。

示例

您可以嘗試執行以下程式碼,在 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>

更新於: 2020-01-31

217 次瀏覽

開啟您的職業生涯

完成課程,獲得認證

開始
廣告
© . All rights reserved.