Style textDecoration 属性
定义和用法
textDecoration 属性设置或返回一个或多个的文本修饰。
提示: 如需为元素规定一个以上的修饰类型,请指定一个空格分隔的列表。
浏览器支持
| 属性 | |||||
|---|---|---|---|---|---|
| textDecoration | Yes | Yes | Yes | Yes | Yes | 
语法
返回 textDecoration 属性:
 object.style.textDecoration
设置 textDecoration 属性:
 object.style.textDecoration = "none|underline|overline|line-through|blink|initial|inherit"
属性值
| 值 | 描述 | 
|---|---|
| none | 默认。定义标准的文本。 | 
| underline | 定义文本下的一条线。 | 
| overline | 定义文本上的一条线。 | 
| line-through | 定义穿过文本的一条线。 | 
| initial | 设置该属性为它的默认值。请参阅 initial | 
| inherit | 从父元素继承该属性。请参阅 inherit | 
技术细节
| 默认值: | none | 
|---|---|
| 返回值: | 一个字符串,表示添加到文本中的装饰 | 
| CSS 版本 | CSS1 | 
更多实例
相关页面
CSS 教程: CSS Text
CSS 参考手册: text-decoration property
❮ Style 对象
