HTML DOM Style textDecorationColor 屬性
定義和用法
textDecorationColor 屬性規定文本修飾(下劃線underline、上劃線overline、中劃線line-through)的顏色。
注意:只有在帶有可見的text-decoration的元素上,textDecorationColor屬性才起作用。
瀏覽器支持
幾乎所有的主流瀏覽器都不支持textDecorationColor 屬性。
Firefox 支持另一個可替代該屬性的屬性,即MozTextDecorationColor 屬性。
語法
返回textDecorationColor 屬性:
object .style.textDecorationColor
設置textDecorationColor 屬性:
object .style.textDecorationColor="color|initial|inherit"
屬性值
值 | 描述 |
---|---|
color | 规定文本修饰的颜色。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
技術細節
默認值: | currentColor |
---|---|
返回值: | 字符串,表示元素的text-decoration-color 屬性。 |
CSS 版本 | CSS3 |
相關文章
CSS參考手冊: text-decoration-color屬性