设置下划线文字装饰的偏移距离:
div.a {
text-decoration: underline;
}
div.b {
text-decoration: underline;
text-underline-offset: 10px;
}
div.c {
text-decoration: underline wavy blue;
}
div.d {
text-decoration: underline wavy blue;
text-underline-offset: 10px;
}
亲自试一试 »
这个text-underline-offset
属性指定下划线文本装饰的偏移距离。
表中的数字指定完全支持该属性的第一个浏览器版本。
Property | |||||
---|---|---|---|---|---|
text-underline-offset | 87.0 | 87.0 | 70.0 | 12.1 | 73.0 |
text-underline-offset: auto|
length|
percentage|initial|inherit;
Value | Description | Play it |
---|---|---|
auto | Default value. The browser sets the appropriate offset for the underline | Demo ❯ |
length | Specifies the offset as a length value | Demo ❯ |
percentage | Specifies the offset as a percentage value | 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 参考:textDecoration 属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!