Add background image for input type="button" - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button

Description

Add background image for input type="button"

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style type="text/css">

.button{<!--  ww w .j a v a2s  .co  m-->
   background: url(https://www.java2s.com/style/demo/InternetExplorer.png) no-repeat;
   cursor:pointer;
   border: none;
}


      </style> 
 </head> 
 <body> 
  <input type="button" name="button" value="Search" onclick="showUser()" class="button"> 
  <input type="image" name="button" value="Search" onclick="showUser()" class="button"> 
  <input type="submit" name="button" value="Search" onclick="showUser()" class="button">  
 </body>
</html>

Related Tutorials