CSS text-decoration property
Examples
Set h1, h2, h3 and h4 text decorative elements:
h1 {text-decoration: overline}
h2 {text-decoration: line-through}
h3 {text-decoration: underline}
h2 {text-decoration: line-through}
h3 {text-decoration: underline}
try it"
Attribute definitions and instructions
text-decoration property provisions added to the modified text.
Note: The color settings modified by the "color" property.
Defaults: | none |
---|---|
inherit: | no |
version: | CSS1 |
JavaScript syntax: | object .style.textDecoration = "overline" |
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
text-decoration | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
Property Value
value | description |
---|---|
none | default. Definition of the standard text. |
underline | Under the definition of a line of text. |
overline | A line defined text. |
line-through | Through the definition of a line of text under. |
blink | Definition of blinking text. |
inherit | Provisions should inherit the text-decoration property value from the parent element. |
related articles
CSS tutorial: CSS text