Style textIndent 屬性
描述
textIndent 屬性用於設定或返回文字的第一個行的縮排。
注意: 允許使用負值。如果值為負數,則第一行將向左縮排。
瀏覽器支援
屬性 | |||||
---|---|---|---|---|---|
textIndent | 是 | 是 | 是 | 是 | 是 |
語法
返回 textIndent 屬性
object.style.textIndent
設定 textIndent 屬性
object.style.textIndent = "length|%|initial|inherit"
屬性值
值 | 描述 |
---|---|
length | 定義以長度單位表示的縮排。預設值為 0 |
% | 定義以父元素寬度的百分比表示的縮排 |
initial | 將此屬性設定為其預設值。閱讀關於 initial |
inherit | 從其父元素繼承此屬性。閱讀關於 inherit |
技術詳情
預設值 | 0 |
---|---|
返回值 | 一個字串,表示元素中文字第一行的縮排 |
CSS 版本 | CSS1 |
更多示例
相關頁面
CSS 教程: CSS 文字
CSS 參考: text-indent 屬性