设置不同类型的文本装饰样式:
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
属性设置文本装饰的样式(如实线、波浪线、点线、虚线、双线)。
提示:另请参阅文字修饰property,它是 text-decoration-line、text-decoration-style、text-decoration-color 和 text-decoration-thickness 的简写属性。
表中的数字指定完全支持该属性的第一个浏览器版本。
后跟 -moz- 的数字指定使用前缀的第一个版本。
Property | |||||
---|---|---|---|---|---|
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;
Value | Description | Play it |
---|---|---|
solid | Default value. The line will display as a single line | Demo ❯ |
double | The line will display as a double line | Demo ❯ |
dotted | The line will display as a dotted line | Demo ❯ |
dashed | The line will display as a dashed line | Demo ❯ |
wavy | The line will display as a wavy line | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
CSS教程:CSS 文本装饰
HTML DOM 参考:textDecorationStyle 属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!