Make HTML button appear pressed in different style - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button style

Description

Make HTML button appear pressed in different style

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

button:active {<!--   w w w . ja va 2  s  .c  o m-->
   color: red;
   background-color: pink;
   padding: 8px;
}


      </style> 
 </head> 
 <body> 
  <button>Hello!</button>  
 </body>
</html>

Related Tutorials