Make image hover and change image's background - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image

Description

Make image hover and change image's background

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
img {<!--from w  w w.  j a  v a  2 s  .c  o  m-->
   background:steelblue;
}

img:hover {
   background:skyblue;
}
</style> 
 </head> 
 <body> 
  <img src="https://www.java2s.com/style/demo/Firefox.png">  
 </body>
</html>

Related Tutorials