Make buttons have pressed effect

Here I will introduce the small trick. You only add a little code, then make buttons have pressed effect. Just like a button is really pressed. See the codes below.

See the Pen Pressed Button by wpaesthetic (@wpaesthetic) on CodePen.18474

Just doing two things:

  1. Set the position property of the button tag with relative value.
  2. Set the top property with 1px value.

Leave a Reply