English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
text-decoration-The 'style' CSS property specifies the line type to be used for text decoration.
Note: You can also use 'text'-The 'decoration' property sets the text-decoration-line.text-decoration attribute is text-decoration-line, text-decoration-style and text-decoration-The shorthand attribute of the color attribute.
The following table provides usage instructions and version history of this attribute, as well as its syntax in JavaScript scripts.
Default Value: | solid |
---|---|
Applies to: | All elements. It also applies to ::first-letter and ::first-line |
Inheritance: | None |
Animatable: | No.See also Animation Attributes. |
Version: | CSS3new feature |
JavaScript Syntax: | object.style.textDecorationStyle="wavy" |
The syntax of this attribute is as follows:
text-decoration-style: [ solid | double | dotted | dashed | wavy ] one or more values | initial | inherit
The following examples demonstrate how to use text-decoration-style attribute.
p { text-decoration: underline; -moz-text-decoration-style: dotted; /* Firefox */ text-decoration-style: dotted; }Test to see‹/›
The following table describes the values of this attribute.
Value | Description |
---|---|
solid | This line is displayed as a solid line. This is the default value. |
double | This line is displayed as a double line. |
dotted | This line is displayed as a dashed line. |
dashed | This line is displayed as a dashed line. |
wavy | This line is displayed as a wavy line. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element uses its parent element text-decoration-The value of the style attribute. |
text-decoration-Most browsers do not support this attribute.
|
Warning:text-decoration-Warning: 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-line,text-decoration-color.