Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Change Text Color Randomly

I know how to make that with JS but in http://daneden.github.io/animate.css/ Animate.css text changes so smoothly and there's no JS on it!

Can someone explain me?

Thanks

like image 482
DifferentPseudonym Avatar asked Aug 26 '14 13:08

DifferentPseudonym


1 Answers

h1 {
    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);
    }
}

for a markup like this

<h1>CHANGE COLOR TEXT</h1>

You can see an example here : http://jsfiddle.net/3oqep26z/

Modify the animation time for faster color changes

like image 128
Vangel Tzo Avatar answered Oct 27 '22 06:10

Vangel Tzo