Change input background when having focus - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

Change input background when having focus

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">
input:focus {<!--from  ww  w .  j  av a2s  .co  m-->
   background-color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <input type="text">  
 </body>
</html>

Related Tutorials