CSS text-decoration-color 属性
实例
改变下划线文本中下划线的颜色:
p
{
text-decoration: underline;
text-decoration-color: red;
-moz-text-decoration-color: red; /* 针对 Firefox 的代码 */
}
{
text-decoration: underline;
text-decoration-color: red;
-moz-text-decoration-color: red; /* 针对 Firefox 的代码 */
}
尝试一下 »
浏览器支持
 
 
 
 

几乎所有的主流浏览器都不支持 text-decoration-color 属性。
Firefox 支持另一个可替代该属性的属性,即 -moz-text-decoration-color 属性。
定义和用法
text-decoration-color 属性规定文本修饰(下划线 underline、上划线 overline、中划线 line-through)的颜色。
注意:只有在带有可见的 text-decoration 的元素上,text-decoration-color 属性才起作用。
| 默认值: | currentColor | 
|---|---|
| 继承: | 否 | 
| 可动画化: | 是。请参阅 可动画化(animatable)。 尝试一下 | 
| 版本: | CSS3 | 
| JavaScript 语法: | object.style.textDecorationColor="red" 尝试一下 | 
CSS 语法
text-decoration-color: color|initial|inherit;
属性值
| 值 | 描述 | 测试 | 
|---|---|---|
| color | 规定文本修饰的颜色。 | 测试 » | 
| initial | 设置该属性为它的默认值。请参阅 initial。 | 测试 » | 
| inherit | 从父元素继承该属性。请参阅 inherit。 | 

 CSS教程
CSS教程 CSS3 教程
CSS3 教程 Bootstrap3 教程
Bootstrap3 教程 Bootstrap4 教程
Bootstrap4 教程 Font Awesome 图标
Font Awesome 图标 Foundation5 教程
Foundation5 教程 CSS 参考手册
 CSS 参考手册