Home > Web Front-end > CSS Tutorial > Summarize the definition and usage of text-decoration in css

Summarize the definition and usage of text-decoration in css

零下一度
Release: 2017-06-17 09:28:03
Original
6966 people have browsed it

text-decoration Definition and Usage

Specifies decorations added to text.

        Notes: The modified color is set by the "color" attribute.

none :  无装饰
blink :  闪烁
underline :  下划线
line-through :  贯穿线
overline :  上划线
Copy after login

Description:
Retrieve or set the decoration of the text in object .
The default value of a, u, and ins objects with href characteristics is underline.
Object strike, s, del, the default value is line-through.
This property will not work on objects without text.
The corresponding script feature is textDecoration. Please see other books I have written.
Example:

div { text-decoration : underline; } 
div { text-decoration : underline overline; }
Copy after login

If the none value is at the end of the attribute declaration, all other previous values ​​will be cleared. For example, declaring text-decoration: underline overline blink none is equivalent to declaring text-decoration: none .
If the object has no text (such as img element) or is an empty element (such as: ), this attribute will not take effect.
If you set the value of this property of the body object to none, the a object will still maintain its original underline style. Unless you declare this property value on an object.

Summarize the definition and usage of text-decoration in css

text-decoration is used to specify an attribute added to text decoration.
For example,

h1 {text-decoration:overline}
h2 {text-decoration:line-through}
h3 {text-decoration:underline}
h4 {text-decoration:blink}
Copy after login

inherit specifies that it should be inherited from the parent ElementInherits The value of the text-decoration attribute.
All major browsers support the text-decoration attribute.
Any version of Internet Explorer (including IE8) does not support the attribute value "inherit" .
IE, Chrome or Safari do not support the "blink" attribute value.

The above is the detailed content of Summarize the definition and usage of text-decoration in css. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template