css text-decoration underline strikethrough attribute style

1. DIV+CSS underline basics

DIV CSS text-decoration underline, strikethrough, and overline properties. This section introduces the use of div+css styles to implement text font underline, font strikethrough, and overline styles.

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

 

text-decoration underline CSS word value parameters:
none : no decoration
blink : blink
underline : underline
line-through : through line
overlay : overline

 

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-through line style
text-decoration:overline overline style

 

2. Complete underline delete underline case

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

1. CSS code snippet:

  1. .divcss5{text-decoration:underline} 
  2. .divcss5_1{text-decoration:line-through} 
  3. .divcss5_2{text-decoration:overline} 

2. HTML code snippet:

  1. < div class = "divcss5" > I'm underlined </ div >  
  2. < div class = "divcss5_1" > I am strikethrough </ div >  
  3. < div class = "divcss5_2" > I'm underlined </ div >  

3. Screenshots of css strikethrough, css underline and css overline cases

Screenshot of css strikethrough, css underline, css overline case
CSS strikethrough underline underline case screenshot

 

Therefore, in addition to the previously summarized <del> tags, css can also be controlled. And it has been tested and has good compatibility

.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326220938&siteId=291194637