Continue CSS animation on :hover after mouse leave the element - HTML CSS CSS Animation

HTML CSS examples for CSS Animation:Animation Control

Description

Continue CSS animation on :hover after mouse leave the element

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">

#some-div {<!--   w  ww. j  av a  2s.  c  om-->
   width: 100px;
   height: 100px;
   background-color: rgba(100,100,0,0.2);
   transition: background-color 0.5s ease;
}
#some-div:hover { background-color: rgba(100,0,0,0.7); }


      </style> 
 </head> 
 <body> 
  <div id="some-div"> 
  </div>  
 </body>
</html>

Related Tutorials