html 首行缩进2个汉字
生活随笔
收集整理的這篇文章主要介紹了
html 首行缩进2个汉字
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
html 首行縮進
使用 CSS text-indent 屬性。
text-indent 屬性規定文本塊中首行文本的縮進。
注意: 負值是允許的。如果值是負數,將第一行左縮進。
舉例
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>html預覽</title> </head> <body><h1>html預覽</h1> <p style="text-indent:2em;">使用text-indent能夠實現首行縮進。舉例:<p style="text-indent:2em;">。em是長度單位,它是描述相對于應用在當前元素的字體尺寸,所以它也是相對長度單位。2em就是在當前環境下2個字的尺寸,即一個字大小的兩倍。</p> <p style="text-indent:2em;">a b c d e f g h i j k l m n o p q r s t u v w x y z ;a b c d e f g h i j k l m n o p q r s t u v w x y z ;a b c d e f g h i j k l m n o p q r s t u v w x y z ;a b c d e f g h i j k l m n o p q r s t u v w x y z ;a b c d e f g h i j k l m n o p q r s t u v w x y z ;a b c d e f g h i j k l m n o p q r s t u v w x y z ;</p></body> </html>總結
以上是生活随笔為你收集整理的html 首行缩进2个汉字的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 扁桃体肥大是什么原因
- 下一篇: 有治愈牙周病的吗