Hi, I’m Brian Dys — a photographer from the inside looking out · a composer entangled in electronic music · a UX designer · a spouse, a parent, & everything in between.
Two of the ways in which you can show an illusion of a button being pressed are: darkening the
background-color and nudging its vertical position.
It is important to provide for a hint when a user activates an element in your user interface (in this example, a button). The feedback assures the user that the element “responds” to his action.
The advantage of using
transform: translateY is that it does not affect the elements around it (unlike using