How to use text-decoration

php中世界最好的语言
Release: 2018-05-30 11:49:00
Original
5401 people have browsed it

We often use CSS code to underline text content on web pages. Then we have to usetext-decoration. How to use it? Today we will give you a good introduction.

Use CSS attribute words:

text-decoration : none || underline || blink || overline || line-through

text-decoration underline CSS word value parameter :

none : No decoration

blink : Blink

underline : Underline

line-through : Throughline

overline : Overline Underline

text-decoration:none No decoration, usually remove the underline style for html underline tags

text-decoration:underline Underline style

text-decoration:line-through Strikethrough style - throughline style

text-decoration:overline Overline style

HTML regular underline tag

Underline tag "U" in HTML u tag Object text is underlined in HTML.

Example:

我被U标签加下滑线
Copy after login

CSS control object underline attribute style

html u underline and CSS underline comparison application case

CSS removehtml tagUnderline style

If we want to remove the strikethrough style of the corresponding html s tag, remove the html u underline, and remove the html overline style.

1. Remove the html s strikethrough line style

.p s{text-decoration:none}

Remove the html s label style attribute in the p class object box

2. Remove the html u underline style

.p u{text-decoration:none}

Remove the u label underline style attribute in the p class object box

5.HyperlinkAdvanced use of underline - TOP

Next we will explain common CSS hyperlinks. Text objects will be underlined when passing by them.

The code is as follows:

    下划线演示  

p

Copy after login

Please copy the above code and create a new HTML to view the example style.

We set the text underline, text strikethrough style, and font overline style for the three box objects respectively.

1. CSS code snippet:

.p{text-decoration:underline}

.p_1{text-decoration:line-through}

.p_2{text-decoration:overline}

2. HTML code snippet:

I am underlined

I am struck through

I am underlined

I have introduced so much, I believe you have mastered text-decoration. Friends in need can save it. Please also continue to pay attention to other updates on this site.

Related reading:

What are the functions of comments in html


How to clear floating in CSS


How to use label tags in html

The above is the detailed content of How to use text-decoration. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!