CSS text-decoration-style 属性
实例
设置不同类型的 text-decoration 样式:
  div.a
{
text-decoration-line: underline;
text-decoration-style: solid;
}
div.b {
text-decoration-line: underline;
text-decoration-style: wavy;
}
div.c {
text-decoration-line: underline;
text-decoration-style: double;
}
div.d {
text-decoration-line: overline underline;
text-decoration-style: wavy;
}
亲自试一试 »
text-decoration-line: underline;
text-decoration-style: solid;
}
div.b {
text-decoration-line: underline;
text-decoration-style: wavy;
}
div.c {
text-decoration-line: underline;
text-decoration-style: double;
}
div.d {
text-decoration-line: overline underline;
text-decoration-style: wavy;
}
定义和用法
text-decoration-style 属性设置文本装饰的类型(实线、波浪线、点线、虚线、双线)。
提示: 同时请参阅 text-decoration 属性,它是这三个属性的简写属性:
| 默认值: | solid | 
|---|---|
| 继承性: | no | 
| 支持动画: | no. 阅读有关动画的信息 | 
| 版本: | CSS3 | 
| JavaScript 语法: | object.style.textDecorationStyle="wavy" 测试一下 | 
浏览器支持
表中的数字表示支持该属性的第一个浏览器版本。
紧跟在 -moz- 前的数字为支持该前缀属性的第一个浏览器版本号。
| 属性 | |||||
|---|---|---|---|---|---|
| text-decoration-style | 57.0 | 79.0 | 36.0 6.0 -moz- | 12.1 | 44.0 | 
语法
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
属性值
| 值 | 描述 | 试一试 | 
|---|---|---|
| solid | 默认值。线条显示为单行。 | 亲自试一试 » | 
| double | 线条显示为双线。 | 亲自试一试 » | 
| dotted | 线条显示为点线。 | 亲自试一试 » | 
| dashed | 线条显示为虚线。 | 亲自试一试 » | 
| wavy | 线条显示为波浪线。 | 亲自试一试 » | 
| initial | 将此属性设置为其默认值。请参阅 initial | 亲自试一试 » | 
| inherit | 从其父元素继承此属性。请参阅 inherit | 
相关页面
CSS 教程: CSS 文本
HTML DOM 参考手册: textDecorationStyle 属性
