Image button alters position on hover - HTML CSS CSS Form

HTML CSS examples for CSS Form:input image button

Description

Image button alters position 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">

div{<!--from  ww w .  j  a v a  2  s  .  c om-->
   width:98px;
   height:45px;
   /*border:1px solid red;*/
   background-image:url('https://www.java2s.com/style/demo/Safari.png');
   background-position: -83px -123px;
}
div:hover {
   background-position: -83px -177px;
}


      </style> 
 </head> 
 <body> 
  <div></div>  
 </body>
</html>

Related Tutorials