CSS Pseudo-class :focus
This selector selects an element while it's in the input focus state. An example in HTML is an input field which contains the cursor, so you can enter text in it.
Examples
Compatibility
Chrome | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|
2+ | Any | 8+ | 9.2+ | 1.3+ |