Change logo to colour on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to change

Description

Change logo to colour on hover

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">
#logo {<!-- w  w  w .ja va 2 s .c  o m-->
   -webkit-filter:grayscale(100%);
   -webkit-transition:.6s ease-in-out;
   -moz-filter:grayscale(100%);
   -moz-transition:.6s ease-in-out;
   -o-filter:grayscale(100%);
   -o-transition:.6s ease-in-out;
}

#logo:hover {
   -webkit-filter:grayscale(0%);
   -webkit-transition:.6s ease-in-out;
   -moz-filter:grayscale(0%);
   -moz-transition:.6s ease-in-out;
   -o-filter:grayscale(0%);
   -o-transition:.6s ease-in-out;
}
</style> 
 </head> 
 <body> 
  <img id="logo" src="https://www.java2s.com/style/demo/Google-Chrome.png">  
 </body>
</html>

Related Tutorials