CSS text-decoration-color 属性
定义和用法
text-decoration-color
属性指定文本装饰(下划线、上划线、删除线)的颜色。
提示: 还可以查看 text-decoration 属性,它是 text-decoration-line、text-decoration-style、text-decoration-color 和 text-decoration-thickness 的简写属性。
默认值 | currentColor |
---|---|
继承 | no |
可动画 | 是。 了解可动画属性 Try it |
版本 | CSS3 |
JavaScript 语法 | object.style.textDecorationColor="red" Try it |
浏览器支持
表中的数字指定了完全支持该属性的第一个浏览器版本。
属性 | |||||
---|---|---|---|---|---|
text-decoration-color | 57 | 79 | 36 | 12.1 | 44 |
CSS 语法
text-decoration-color: color|initial|inherit;
属性值
值 | 描述 | 试一试 |
---|---|---|
color | 设置文本装饰的颜色 | 演示 ❯ |
initial | 将此属性设置为其默认值。阅读关于initial | |
inherit | 从其父元素继承此属性。阅读关于inherit |
相关页面
CSS 教程:CSS 文本装饰
HTML DOM 参考: textDecorationColor 属性