CSS参考手册
»
属性列表
»
文本属性
»
相关内容:
其它文本属性参考
选择其它项
text-indent
text-overflow
text-align
text-transform
text-decoration
text-shadow
text-fill-color
text-stroke
text-stroke-width
text-stroke-color
letter-spacing
word-spacing
vertical-align
word-wrap
white-space
direction
unicode-bidi
line-height
tab-size
text-decoration
版本:CSS1
继承性:无
语法:
text-decoration
:none | underline | overline | line-through | blink
默认值
:
none
取值:
none:
指定文字无装饰
underline:
指定文字的装饰是下划线
overline:
指定文字的装饰是上划线
line-through:
指定文字的装饰是贯穿线
blink:
指定文字的装饰是闪烁。
写本文档时仅Firefox和Opera支持该参数值
说明:
检索或设置对象中的文本的装饰。
对应的脚本特性为
textDecoration
。
兼容性:
浅绿
= 支持
红色
= 不支持
墨绿
= 部分支持
橙色
= 实验性质
支持版本
\类型
IE
Firefox
Safari
Chrome
Opera
版本
6.0-9.0
#1
4.0
5.1
#2
13.0
#3
11.50
IE9及更早浏览器不支持blink。
Safari5.1不支持blink。
Chrome13.0不支持blink。
示例:
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8" /> <title>CSS text-decoration_CSS参考手册_web前端开发参考手册系列</title> <meta name="author" content="phpstudy.net" /> <meta name="copyright" content="www.phpstudy.net" /> <style> .test li{margin-top:10px;} .test .none{text-decoration:none;} .test .underline{text-decoration:underline;} .test .overline{text-decoration:overline;} .test .line-through{text-decoration:line-through;} .test .blink{text-decoration:blink;} </style> </head> <body> <ul class="test"> <li class="none">无装饰文字</li> <li class="underline">带下划线文字</li> <li class="overline">带上划线文字</li> <li class="line-through">带贯穿线文字</li> <li class="blink">带闪烁文字</li> </ul> </body> </html>