I'm facing an issue with a link that has an infinite animation changing the background color. I'm looking to stop the animation and have it transition into a different background color upon hovering over it.
.startlink{
background-color:#206a9e;
color:#fff;
border-radius:15px;
font-family: 'Myriad Pro';
-webkit-animation:changeColor 3.4s infinite;
-webkit-transition:all 0.2s ease-in;
}
.startlink:hover{
-webkit-animation-play-state: paused;
background-color: #014a2a;
}
@-webkit-keyframes changeColor
{
0% {background:#206a9e;}
50% {background:#012c4a;}
100% {background:#206a9e;}
}
Can anyone help me understand why this code isn't working as expected? Is there another method to achieve this without using Javascript?