text-decoration

介绍

text-decoration 属性用于设置文本的修饰线外观。它是 text-decoration-line, text-decoration-color, text-decoration-style 属性的缩写。

使用示例

语法

text-decoration: underline;
text-decoration: line-through red;
text-decoration: none;

取值

text-decoration-line

用于设置元件中的文本的修饰类型。

  • none
    默认值无修饰线。

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

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

text-decoration-color

  • <color> 修饰文本的线的颜色。

text-decoration-style

用于设置由 text-decoration-line 设定的线的样式

  • solid 画一条实线。

  • double 画一条双实线。

  • dotted 画一条点划线。

  • dashed 画一条虚线。

  • wavy 画一条波浪线。

形式定义

初始值空值
适用元素text
是否支持继承yes
是否支持动画no

与 Web 的区别

兼容性

LCD tables only load in the browser

除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。