offline version v3


141 of 298 menu

focus pseudo-class

The focus pseudo-class sets styles for input, textarea or links with input focus. Input focus - this is when we clicked on the input and the stick cursor blinks (you can enter text).

Syntax

input:focus { }

Example

After receiving focus, the input will have a red border and shadow:

<input> input:focus { border: 1px solid red; box-shadow: 0 0 3px red; }

:

enru