Change input border on focus - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

Change input border on 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">
label {<!--from  www  .  j  a  v  a2s .co  m-->
   display:block;
   margin:21px;
   width:421px;
   overflow:auto;
   font-family:sans-serif;
   font-size:21px;
   color:Chartreuse;
   text-shadow:0 0 3px yellow;
   padding:21px 11px 11px 0;
}

input {
   float:right;
   width:201px;
   border:3px solid blue;
   border-radius:8px;
   font-size:21px;
   padding:6px;
   margin-top:-11px;
   transition:box-shadow 2s;
   box-shadow:0 0 0 pink;
}

input:focus {
   outline:0 none;
   box-shadow:0 0 11px OrangeRed;
}
</style> 
 </head> 
 <body> 
  <label>Lorem ipsum dolor sit<input type="password"> </label> 
  <label>Lorem ipsum dolor<input type="password"> </label>  
 </body>
</html>

Related Tutorials