Home > database >  How to stripe a text in span using bootstrap class
How to stripe a text in span using bootstrap class

Time:01-11

I have some <span>'s

<span>SOME TEXT HERE</span>
<span> MORE TEXT</span>
<span >ANOTHER TEXT BUT STRIPED</span>

I did not find how to stripe a text in bootstrap.

I solved it using

<span><s>ANOTHER TEXT BUT STRIPED</s></span>

but is there another way? Does that bootstrap class exist?

CodePudding user response:

You're looking for the following class:

text-decoration-line-through

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/>

<span class='text-decoration-line-through'>bootstap</span>


In the Text decoration family, there are also:

  • text-decoration-underline
  • text-decoration-none

CodePudding user response:

Yes,.text-decoration-line-through https://getbootstrap.com/docs/5.1/utilities/text/#text-decoration

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/>

<span class='text-decoration-line-through'>same answer</span>

  •  Tags:  
  • Related