CSS text-decoration-style 属性
实例
显示不同类型的下划线:
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-style | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 | 44.0 |
定义和用法
text-decoration-style 属性规定线条如何显示。
| 默认值: | solid |
|---|---|
| 继承: | 否 |
| 可动画化: | 否。请参阅 可动画化(animatable)。 |
| 版本: | CSS3 |
| JavaScript 语法: | object.style.textDecorationStyle="wavy" 尝试一下 |
CSS 语法
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
属性值
| 值 | 描述 | 测试 |
|---|---|---|
| solid | 默认值。线条将显示为单线。 | 测试 » |
| double | 线条将显示为双线。 | 测试 » |
| dotted | 线条将显示为点状线。 | 测试 » |
| dashed | 线条将显示为虚线。 | 测试 » |
| wavy | 线条将显示为波浪线。 | 测试 » |
| initial | 设置该属性为它的默认值。请参阅 initial。 | 测试 » |
| inherit | 从父元素继承该属性。请参阅 inherit。 |
CSS 参考手册
点我分享笔记