Home  >  Article  >  Web Front-end  >  How to set the color of css strikethrough

How to set the color of css strikethrough

藏色散人
藏色散人Original
2021-05-27 11:11:313876browse

In CSS, you can set the color of the strikethrough through the text-decoration attribute. The setting statement is such as "text-decoration: line-through red;", where the red parameter represents the color of the strikethrough.

How to set the color of css strikethrough

The operating environment of this article: Windows7 system, css3 version, DELL G3 computer

text-decoration attribute specifies the modifications added to the text, underline, Overline, strikethrough, etc.

The text-decoration attribute is the abbreviation of the following three attributes:

text-decoration-line
text-decoration-color
text-decoration-style

Syntax

/*关键值*/
text-decoration: none;                     /*没有文本装饰*/
text-decoration: underline red;            /*红色下划线*/
text-decoration: underline wavy red;       /*红色波浪形下划线*/
text-decoration: line-through red;             /*红色删除线*/
/*全局值*/
text-decoration: inherit;
text-decoration: initial;
text-decoration: unset;

Attribute value

none Default. Text that defines the standard.

underline Defines a line under the text.

overline defines a line on the text.

line-through defines a line that passes under the text.

blink defines blinking text.

inherit specifies that the value of the text-decoration attribute should be inherited from the parent element.

Recommended learning: "css video tutorial"

The above is the detailed content of How to set the color of css strikethrough. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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