I want to show underline 50% behind the text. Like this
When I try using text-underline-offset
with negative value, the underline will get hidden. But if the negative value is high enough it will be shown above the text instead.
I expect "Third Link" to show underline slightly behind text. Is there anything I can add to make it work?
The code are https://jsbin.com/kecuxitiha/edit?html,css,output
HTML
Lorem Ipsum is simply dummy <a href="#" class="first">First Link</a> text <a href="#" class="second">Second Text</a> of
the printing and typesetting industry. <a href="#" class="third">Third Link</a>
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
CSS
a {
color: red;
text-decoration-thickness: 6px;
text-decoration-color: yellow;
}
.second {
text-underline-offset: -21px;
}
.third {
text-underline-offset: -4px;
}