Is it possible to rotate the highlight on a link when hovered? I'm new at this, so apologies if this question seems basic.
This is how my css/html is currently structured:
.links {
display: block;
}
.links a {
color: #000000;
text-decoration: none;
display: inline;
width: 150px;
box-shadow: inset 0 0 0 0 #000;
overflow: visible;
-webkit-transition: all ease 0.5s;
-moz-transition: all ease 0.5s;
transition: all ease 0.5s;
}
.links a:hover {
display: inline-block;
transform: rotate(20deg);
color: #FFFFFF;
text-decoration: none;
box-shadow: inset 0 50px 0 0 #ea1a00;
}
<div class="links">
<a href="example.com">
<span>Link example</span>
</a>
</div>
(Adapted from teaclub.crd.co)
I wanted to achieve a specific effect where only the red highlight (not the text) rotates when the link is hovered over.
I attempted using the transform: rotate function but found that it always affected the text as well. Is there a way to separate them?
Thank you for your help!