# text-decoration-line

CSS 属性 text-decoration-line 用于设置元素中的文本的修饰类型。当要设置多个线修饰属性时,用 text-decoration 简写属性会比分别写多个属性更方便。

# uni-app x 兼容性

Android iOS web
3.9 4.11 4.0

# 语法

text-decoration-line: none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error;

# text-decoration-line 的属性值

underline 在文本的下方有一条修饰线。

line-through 有一条贯穿文本中间的修饰线。

overline 在文本的上方有一条修饰线。

# 默认值

none

# 适用组件

# 兼容性

# text-decoration-line 的属性值兼容性

Android iOS web
underline 3.9 4.11 4.0
line-through 3.9 4.11 4.0
overline x x 4.0

# 浏览器兼容性

Chrome Edge Firefox Opera Safari IE
text-decoration-line √( 57 ) √( 79 ) √( 36 ) √( 44 ) √( 12.1 ) x

# App平台差异

  • text-decoration-line 样式不支持继承
  • App平台仅支持underline和line-through属性

# 参见