Summarize the definition and usage of text-decoration in CSS

Source: Internet
Author: User
Text-decoration Definition and usage

Specifies the adornment that is added to the text.

Note: The decorated color is set by the "Color" property.

None: No decoration blink: Flashing underline: underline Line-through: Through line overline: Dash

Description
Retrieves or sets the decoration of the text in an object.
A with the href attribute, and the U,ins object default value is underline.
The Strike,s,del object, the default value is Line-through.
This property does not work for objects that do not have text.
The corresponding script attribute is textdecoration. Please refer to the other bibliography I have written.
Example:

div {text-decoration:underline;} div {text-decoration:underline overline;}

If the value of none is at the end of the attribute declaration, all previous other values will be cleared. For example, declaring Text-decoration:underline overline blink none equals declaring Text-decoration:none.
This property does not work if the object has no text (such as an IMG element) or an empty element (such as:<em></em>).
If you set this property value to none for the body object, the A object will still maintain its original underline style. Unless you declare this property value for the A object.

Text-decoration is used to specify a property that is added to a text decoration.
Such as

H1 {text-decoration:overline}h2 {text-decoration:line-through}h3 {text-decoration:underline}h4 {text-decoration: Blink

Inherit specifies that the value of the Text-decoration property should be inherited from the parent element.
All major browsers support the Text-decoration property.
The attribute value "inherit" is not supported by any version of Internet Explorer (including IE8).
The "Blink" attribute value is not supported for IE, Chrome, or Safari.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.