Home >Web Front-end >CSS Tutorial >How Can I Create a Thick Underline Behind Text Using CSS?
<p><p>Option 2: Box Shadow<p>Another option is to use box shadow to create the underline:
p { font-size: 100px; font-family: arial; } span { padding: 0 10px; box-shadow: inset 0 -0.4em 0 0 magenta; } span:nth-child(2) { box-shadow: inset 0 -0.55em 0 0 magenta; } span:nth-child(3) { box-shadow: inset 0 -0.7em 0 0 magenta; }
<p> ABC<p>With these methods, you can create the illusion of a thick underline behind your text, either above or below the baseline.
The above is the detailed content of How Can I Create a Thick Underline Behind Text Using CSS?. For more information, please follow other related articles on the PHP Chinese website!