The best CSS text-decoration-color attribute Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Definition and Usage,CSS Syntax,Property Value,

CSS text-decoration-color attribute

CSS Reference CSS Reference


Examples

Change the color of underlined text underlined:

p
{
text-decoration: underline;
text-decoration-color: red;
-moz-text-decoration-color: red; /* 针对 Firefox 的代码 */
}


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost all of the major browsers do not support text-decoration-color attribute.

Firefox supports another alternative of the property attribute that -moz-text-decoration-color attribute.


Definition and Usage

text-decoration-color attribute specifies the text decoration (underline underline, overline overline, underlined line-through) color.

Note: Only the elements with the visible text-decoration, text-decoration-color attribute to work.

Defaults: currentColor
inherit: no
Can be animated: Yes. Please refer to animation (Animatable) . try it
version: CSS3
JavaScript syntax: object .style.textDecorationColor = "red"try


CSS Syntax

text-decoration-color:color|initial|inherit;

Property Value

描述 测试
color 规定文本修饰的颜色。 测试 »
initial 设置该属性为它的默认值。请参阅 initial 测试 »
inherit 从父元素继承该属性。请参阅 inherit

CSS Reference CSS Reference

CSS text-decoration-color attribute
10/30