Za7pi Za7pi - 5 months ago 64
Javascript Question

Text blink from one color to another css or jquery

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

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

Comments