CSS手册
»
属性列表
»
文本装饰属性
»
相关内容:
其它文本装饰属性
选择其它项
text-decoration
text-decoration-line
text-decoration-color
text-decoration-style
text-decoration-skip
text-underline-position
text-shadow
text-decoration-color
版本:CSS3
2018.4.10
语法:
text-decoration-color
:
<color>
默认值
:
currentColor
适用于
:所有元素
继承性
:无
动画性
:是
计算值
:计算后颜色值
媒 体
:视觉
取值:
<color>
:
指定颜色。
说明:
指定元素文本装饰线条的颜色。
对应的脚本特性为:
textDecorationColor
。
兼容性:
浅绿
= 支持
红色
= 不支持
粉色
= 部分支持
Values
IE
Firefox
Chrome
Safari
Opera
iOS Safari
Android Browser
Android Chrome
Basic Support
8.0-16.0
40.0+
40.0-56.0
8.0+
-webkit-
40.0-43.0
8.0+
-webkit-
4.4-56.0
28.0-56.0
57.0+
44.0+
57.0+
57.0+
示例:
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8" /> <title>text-decoration-color - CSS手册 - API参考文档</title> <style> .test li{ margin-top:10px; -webkit-text-decoration-line:underline; -moz-text-decoration-line:underline; text-decoration-line:underline; } .test li:nth-child(1){ -webkit-text-decoration-color:red; -moz-text-decoration-color:red; text-decoration-color:red; } .test li:nth-child(2){ -webkit-text-decoration-color:blue; -moz-text-decoration-color:blue; text-decoration-color:blue; } .test li:nth-child(3){ -webkit-text-decoration-color:yellow; -moz-text-decoration-color:yellow; text-decoration-color:yellow; } </style> </head> <body> <ul class="test"> <li>红色的文本装饰线</li> <li>蓝色的文本装饰线</li> <li>黄色的文本装饰线</li> </ul> </body> </html>