简体中文
text-decoration 简写 CSS 属性设置文本上的装饰性线条的外观。它是 text-decoration-line、text-decoration-color、text-decoration-style 和较新的 text-decoration-thickness 属性的缩写。
Android | iOS | web |
---|---|---|
x | x | 4.0 |
text-decoration: <'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>;
dashed
虚线。
dotted
点划线。
double
双实线。
line-through
贯穿文本中间的线。
none
不画线。
overline
在文本的上方的线。
solid
实线。
underline
下滑线。
wavy
波浪线。
text-decoration-line
设置使用的装饰类型,例如 underline 或者 line-through。
text-decoration-color
设置装饰的颜色。
text-decoration-style
设置装饰的线条的颜色,例如 solid、wavy 或者 dashed。
text-decoration-thickness
设置用于装饰的线条粗细。
Android | iOS | web | |
---|---|---|---|
dashed | x | x | 4.0 |
dotted | x | x | 4.0 |
double | x | x | 4.0 |
line-through | x | x | 4.0 |
none | x | x | 4.0 |
overline | x | x | 4.0 |
solid | x | x | 4.0 |
underline | x | x | 4.0 |
wavy | x | x | 4.0 |
text-decoration-line | x | x | 4.0 |
text-decoration-color | x | x | 4.0 |
text-decoration-style | x | x | 4.0 |
text-decoration-thickness | x | x | 4.0 |
Chrome | Edge | Firefox | Opera | Safari | IE | |
---|---|---|---|---|---|---|
text-decoration | √( 1 ) | √( 12 ) | √( 1 ) | √( 3.5 ) | √( 1 ) | √( 3 ) |
text-decoration 样式不支持继承