Fun button effect with HTML, CSS & JS

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI46 min

About this video

A step-by-step front-end tutorial that builds a glassy button with a hover state, blurred and grainy effects, a pressed state, and a JavaScript pseudo-element that follows the mouse. It is aimed at developers who already know basic HTML and CSS.

What you’ll learn

  • Create a hover state and pseudo-element colour effect with CSS
  • Fix stacking context issues and scope custom properties locally
  • Add blur, grain and an outline to a glass-style button