tubeshowcase●♡ My collection 0
← Learn to Code

Learn to Code32:06

Create a super fun "focus by negation" effect

Kevin Powell ↗

From the creator

Adam Argyle posted a cool looking effect on his blog recently. It's not exactly practical in it's final form, but the earlier stages of it could be useful, and there is a lot to learn in going all-in with it. I took a bit of a different approach with this video, doing it how I'd actually be learning something from a blog post and following along with it, so I'd love to know what you think of this format! 🔗 Links ✅ Adam’s blog post (has codepen examples of each of the steps along the way if you're looking for code): https://nerdy.dev/hover-not-hover-sorry-not-sorry ✅ Easing Wizard: https://easingwizard.com/ Get a YT membership: Join this channel to get access to perks: https://www.youtube.com/channel/UCJZv4d5rbIKd4QHMPkcABCw/join ⌚ Timestamps 00:00 - Introduction 01:15 - The very basics 05:55 - Ensuring it works with focus 06:00 - Adding in a scaling effect 08:10 - Giving the animation some springiness 12:10 - Looking at the mobile experience 13:20 - Custom property based on which element we are hovering 16:10 - Creating a sibling index 17:28 - Using the abs() function to set the distances and do some calculations 24:00 - Debugging 29:00 - Figuring out how to spread them out with transform-origin #css -- Come hang out with other dev's in my Discord Community 💬 https://discord.gg/nTYCvrK Keep up to date with everything I'm up to ✉ https://www.kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! 📺 https://www.twitch.tv/kevinpowellcss --- Help

Published 2025-02-05 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code