Reputation: 33
I was watching the animate.css web page, I want to make the color changing animation that they applied in the animate.css title of their main page, how can I do that?
https://daneden.github.io/animate.css/
Upvotes: 1
Views: 2194
Reputation: 2092
Use web inspector to find out (right click and select inspect element).
They have an h1 with the following style definitions:
h1.site__title {
color: #f35626;
background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;.
-webkit-animation: hue 60s infinite linear;
}
@-webkit-keyframes hue {
from {
-webkit-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(-360deg);
}
}
Upvotes: 1
Reputation: 769
Try it out
h1 {
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: colored 10s infinite linear;
background-image: -webkit-linear-gradient(90deg, #f35626, #feab3a);
}
@-webkit-keyframes colored {
from {
-webkit-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(-360deg);
}
}
<h1>Colored text</h1>
Upvotes: 2