.action:active { transform: translateY(1px); }A one-pixel shift provides brief press feedback.
LESSON 82 OF 100
Move the button subtly while it is being activated.
:active matches while an element is being activated, usually between pressing and releasing the input device. The visual transform does not change document order.
.action:active { transform: translateY(1px); }A one-pixel shift provides brief press feedback.
.action { transform: translateY(1px); }A permanent transform no longer communicates the moment of activation.
Apply transform: translateY(1px) only to .action:active.
The pseudo-class limits the transform to the active state without JavaScript or structural movement.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.