Home > Web Front-end > Front-end Q&A > How to set the color of css strikethrough

How to set the color of css strikethrough

藏色散人
Release: 2023-01-06 11:15:40
Original
3930 people have browsed it

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
Copy after login

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;
Copy after login

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!

Related labels:
css
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