text-decoration的详细信息

如题所述

第1个回答  2016-05-18

语法:
text-decoration:none||underline||blink||overline||line-through
取值:
none: 默认值。无装饰
blink: 闪烁
underline: 下划线
line-through: 贯穿线
overline: 上划线
说明:
检索或设置对象中的文本的装饰。
有href特性的a,以及u,ins对象默认值为underline。
对象strike,s,del,默认值是line-through。
假如none值在属性声明的最后,所有的先前的其他取值都会被清除。例如,声明text-decoration:underline overline blink none等于声明text-decoration:none。
假如对象没有文本(如img元素)或者是空元素(如:),此属性不会发生作用。
假如你设置body对象的此属性值为none,a对象将依然保持其原有的下划线样式。除非你针对a对象声明此属性值。
指定块对象的此属性将影响其所有内联子对象。而此影响一旦发生,块对象容器最终会受到影响。
在IE4+中可用的值为overline和blink。虽然blink值被提供,但它不会被作用。
此属性对于currentStyle对象而言是只读的。对于其他对象而言是可读写的。
对应的脚本特性为textDecoration。
示例:
div{text-decoration:underline;}
div{text-decoration:underlineoverline;}

相似回答