Make Input type button to change color while pressed using :active - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input button

Description

Make Input type button to change color while pressed using :active

Demo Code

ResultView the demo in separate window

<!--<!--from   ww w.j a  va2  s .  c o  m-->
Created using JS Bin
http://jsbin.com
Released under the MIT license: http://jsbin.mit-license.org
-->
<html>
 <head> 
  <style>
input.btn:active {
   background:green;
}
</style> 
 </head> 
 <body> 
  <input type="button" class="btn" value="fsdfs">  
 </body>
</html>

Related Tutorials