Transition through a third color for a hover transition - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Color

Description

Transition through a third color for a hover transition

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

@-webkit-keyframes animate-color {
   0%   { color: red; }
   50%   { color: yellow; }
   100% { color: green; }
}
.class:hover {<!--from  ww w.ja v  a2s. c o  m-->
   -webkit-animation: animate-color 0.4s forwards;
}


      </style> 
 </head> 
 <body> 
  <div class="class">
    123 
  </div>  
 </body>
</html>

Related Tutorials