English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The text-decoration-The lineCSS property specifies what kind of pattern is added to the element. This property can accept one or more space-separated values.
The following table provides usage instructions and version history for this attribute, as well as its syntax in JavaScript scripts.
Default value: | none |
---|---|
Applicable to: | All elements. It also applies to::first-letter and::first-line. |
Inheritance: | None |
Animatable: | No.See also Animation properties. |
Version: | CSS3new feature |
JavaScript syntax: | object.style.textDecorationLine="underline" |
The syntax of this attribute is as follows:
text-decoration-line: none | [ underline | overline | line-through | blink ] one or more values | initial | inherit
The following examples demonstrate how to use text-decoration-line attribute.
p { -moz-text-decoration-line: underline; /* Firefox */ text-decoration-line: underline; } p.multiple { -moz-text-decoration-line: underline overline; /* Firefox */ text-decoration-line: underline overline; }Test see‹/›
The following table describes the values of this attribute.
Value | Description |
---|---|
none | Text has no decoration. This is the default value. |
underline | Each line of text has an underline. |
overline | There is a line above each line of text. |
line-through | There is a line in the middle of each line of text. |
blink | Make the text blink (toggle between visible and invisible). This value is not recommended, and the recommended value isAnimations. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated elements adopt the text of their parent element-decoration-line attribute values. |
text-decoration-line Most browsers do not support this attribute.
|
Warning:text-decoration-line Most browsers currently do not support this attribute. It is best to avoid using this attribute.
Please refer to the following tutorials:CSS text,CSS border.
Related attributes:text-decoration,text-decoration-color,text-decoration-style.