d1n0_
d1n0_

Reputation: 11

What's the difference between input:hover and input:active for a textfield?

On focus, the text-field is already activated and has caret in it. Then is input:active relevant at all for a text-field?

Upvotes: 1

Views: 675

Answers (1)

Oka
Oka

Reputation: 26365

:hover is when the user's cursor is on the element. :active is when the user's cursor is actively pressed on the the element.

On mobile this usually gets blended together.

For input elements there is also the :focus selector, when a user's focus is on the element, i.e., editing a text field.

Upvotes: 3

Related Questions