Create a super fun "focus by negation" effect

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

AdvancedUI32 min

About this video

A CSS walkthrough that builds Adam Argyle's focus-by-negation hover effect step by step, covering scaling, springy animation, mobile behaviour, custom properties, sibling indexes, abs() calculations and transform-origin. The video follows a blog post, so viewers can see how the early stages could be adapted.

What you’ll learn

  • Build a focus-by-negation hover effect with CSS transforms
  • Use custom properties and sibling indexes to vary element behaviour
  • Apply abs() and transform-origin to spread elements from a hover point