- HTML中文网
- 联系QQ:88526
- QQ交流群

- 微信公众号

CSS text-decoration-color 属性
定义和用法
text-decoration-color 属性规定文本修饰(下划线 underline、上划线 overline、中划线 line-through)的颜色。
注意:只有在带有可见的 text-decoration 的元素上,text-decoration-color 属性才起作用。
默认值: | currentColor |
继承: | 否 |
可动画化: | 是。 |
版本: | CSS3 |
JavaScript 语法: | object.style.textDecorationColor="red" |
浏览器支持
几乎所有的主流浏览器都不支持 text-decoration-color 属性。
Firefox 支持另一个可替代该属性的属性,即 -moz-text-decoration-color 属性。
CSS 语法
text-decoration-color: color|initial|inherit;
属性值
值 | 描述 |
color | 规定文本修饰的颜色。 |
initial | 设置该属性为它的默认值。请参阅 initial。 |
inherit | 从父元素继承该属性。请参阅 inherit。 |
改变下划线文本中下划线的颜色:
p { text-decoration: underline; text-decoration-color: red; -moz-text-decoration-color: red; /* 针对 Firefox 的代码 */ }
点击 "运行实例" 按钮查看在线实例
推荐手册