Text blink from one color to another css or jquery

Za7pi picture Za7pi · Mar 18, 2014 · Viewed 36.1k times · Source

I would want to blink a text with two different colors:

For example: blinking a text white-green-white-green-white-green

I don't mind if jQuery or CSS.

Answer

LOTUSMS picture LOTUSMS · Mar 18, 2014

Against my better judgement LOL...You will need to adjust for cross-browser compatibility with webkit, etc

EDITTED TO WORK WITH ALL BROWSERS

 <a href="#"> text</a>


 /* css */

 a {
   animation-duration: 400ms;
   animation-name: blink;
   animation-iteration-count: infinite;
   animation-direction: alternate;
}
@keyframes blink {
   from {
      opacity: 1;
   }
   to {
      opacity: 0;
   }
 }

DEMO