It seems that I can`t modify the style of the Underline, for example when a text is hovered. Or at least I did’t find the option to change the color, the line height, etc.
Set underline when this text is visible.
To change color use css
text-decoration: underline;
text-decoration-color: red;
i tried text-underline-position
but it runs slow for some reason. Everything else works fine, you can set a condition on html element when ‘whatever text’ is hovered, or you can use pseudo :hover class.
Thank you @anon65040322,
The thing is that while I was searching on StackOverflow in looking for this amazing underline animation,
I’ve realized that in Style we can’t change the underline style when a text is hovered (In a native way from bubble).
So right now i try to replicate the css transition (from above example) with this code from StackOverflow:
.un {
display: inline-block;
}
.un:after {
content: '';
width: 0px;
height: 1px;
display: block;
background: black;
transition: 300ms;
}
.un:hover:after {
width: 100%;
}
<span class="un">Underlined Text - Or to be underlined</span>
Yeah it works, same principle, replace “.un” with whatever id you have on whatever text.
I did that :), I am stuck at reversing the transition after the hover (i want the line to go out to the right after the hover)
oh yeah youre right, i copied it exactly, maybe they missed something in their code
try this
Awesome, thanks
This topic was automatically closed after 70 days. New replies are no longer allowed.