Home  >  Article  >  Web Front-end  >  How to remove underline style in css

How to remove underline style in css

王林
王林Original
2021-05-13 16:29:273724browse

The way to remove the underline style in css is to set the attribute [text-decoration: none;]. If we want to add a style to the text, such as a red wavy line, we can set the attribute [text-decoration: underline red;].

How to remove underline style in css

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

If we want to cancel the underline style in the text, we can set the attribute text-decoration: none. Let’s introduce the text-decoration attribute below.

The text-decoration attribute specifies the decorations added to the text, such as underline, overline, strikethrough, etc.

text-decoration: none;                     
/*没有文本装饰*/
text-decoration: underline red;            
/*红色下划线*/
text-decoration: underline wavy red;       
/*红色波浪形下划线*/

Give some examples:

h1.under {
    text-decoration: underline;
}
h1.over {
    text-decoration: overline;
}
p.line {
    text-decoration: line-through;
}
p.blink {
    text-decoration: blink;
}
a.none {
    text-decoration: none;
}
p.underover {
    text-decoration: underline overline;
}

Learning video sharing: css video tutorial

The above is the detailed content of How to remove underline style in css. 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
Previous article:How to set float in cssNext article:How to set float in css