From http://www.w3schools.com (Copyright Refsnes Data)
ExampleSpecify the color of an input field that gets focus:
Try it yourself » |
The :focus pseudo-class adds special style to an element that has keyboard input focus.
![]()
The :focus pseudo-class is supported in all major browsers.
Note: Internet Explorer 8 (and higher) supports the :focus pseudo-class if a !DOCTYPE is specified.
CSS tutorial: CSS Pseudo classes
Complete CSS Reference
From http://www.w3schools.com (Copyright Refsnes Data)