CSS :focus pseudo-class
Complete CSS Reference
Example
Specify the color of an input field that gets focus:
input:focus
{
color:yellow;
} |
Try it yourself »
|
Definition and Usage
The :focus pseudo-class adds special style to an element that has keyboard
input focus.
Browser Support

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.
Related Pages
CSS tutorial: CSS Pseudo classes
Complete CSS Reference
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|