I currently am trying to make text that will change color in a rainbow on hover and it's working very well, only issue is when you take your mouse off of the text it immediately jumps to the original color and I would like it to fluidly fade from the last color into the original one so it looks much smoother.
Also, if you would recommend doing this any different way or in any other languages I am completely open to doing that.
I'm generally new to transitions and I can't seem to figure this out.
<style>
.logo {
font-size: 100px;
margin-top: 10px;
margin-bottom: 5px;
margin-right: auto;
margin-left: auto;
color: #FF006E;
}
.logo:hover {
-webkit-animation:logo 1s infinite;
-ms-animation:logo 1s infinite;
-o-animation:logo 1s infinite;
animation:logo 1s infinite;
}
@-webkit-keyframes logo {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}
@-ms-keyframes logo {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}
@-o-keyframes logo {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}
@keyframes logo {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}
</style>
<div class="logo">
I am RainbowText! Fear me! :D
</div>