When a icon font awesome is hovered, I want the color gradient to animate.
I have tried the following code but is not working:
Code pen: https://codepen.io/anon/pen/exoQmp
What is wrong with my code?
.awesome-gradient {
background: linear-gradient(-45deg, red, blue);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
&:hover {
animation: gradient 10s ease infinite;
}
}
@keyframes gradient {
50% {
background-position: 100% 0;
}
}
I followed and referenced a button tutorial but not applying to the icons.