I am struggling to find a solution to rotate the arrows on the x-axis, which are added by the::before pseudo-element when the link is active. Despite trying keyframes and searching online, I have not been able to achieve the desired result. Below you will find the HTML and CSS code that I have attempted.
.nav {
list-style: none;
}
.side:link,
.side:visited {
color: #0018d1;
font-size: 24px;
text-decoration: none;
}
.side::before {
content: "\21d2";
animation: rotate 0.1s infinite;
}
@keyframes rotate {
0% {
transform: rotateX(0deg);
}
100% {
transform: rotateX(-90deg);
}
}
<div class="sidenav">
<div class="profile-pic"></div>
<nav class="sidenav-container">
<ul class="nav sidenav-list">
<li><a class="side nav-link" href="#About">About</a></li>
<li><a class="side nav-link" href="#Skills">Resume</a></li>
<li><a class="side nav-link" href="#projects">projects</a></li>
<li><a class="side nav-link" href="#contact">Contact</a></li>
</ul>
</nav>
</div>