text-decoration

语法:

text-decoration:[ text-decoration-line ] || [ text-decoration-style ] || [ text-decoration-color ]

默认值看每个独立属性

适用于:所有元素

继承性:无

取值:

[ text-decoration-line ]:
指定文本装饰的种类。相当于CSS2.1的 text-decoration 属性,可取值:none | underline | overline | line-through | blink (Firefox1.0及Opera4.0开始支持blink,其它浏览器尚不支持)
[ text-decoration-style ]:
指定文本装饰的样式。
[ text-decoration-color ]:
指定文本装饰的颜色。

说明:

复合属性。检索或设置对象中的文本的装饰。
  • 所有浏览器均支持CSS2.1中的text-decoration属性,在CSS3中,原CSS2.1中的text-decoration属性被移植到新text-decoration属性的分解属性text-decoration-line上;
  • 对应的脚本特性为textDecoration

兼容性:

  • 浅绿 = 支持
  • 红色 = 不支持
  • 墨绿 = 部分支持
  • 橙色 = 实验性质
支持版本\类型 IE Firefox Safari Chrome Opera
版本 6-9 #1 4-18 #1 5.1.7 #1 13-23 #1 11.5-12.5 #1
  1. 不支持:CSS3下的text-decoration复合属性写法。

示例: