🎓 Did you know I have courses, including several free ones? kevinpowell.co/courses?...
Modern CSS is opening up some really interesting CSS-only solutions, including directionally-aware effects! In this one, I look at how we can do a directionally-aware hover effect for a navigation similar to the RU-vid tabs I looked at recently, including dealing with browsers that don’t support everything we’re doing in this one.
It’s not a perfect solution, but there’s still a lot to learn by building something like this 🙂.
🔗 Links
✅ CSS Weekly: / @cssweekly
✅ The CSS Weekly video that inspired this: • CSS Navbar: Create a B...
✅ My clone of RU-vid’s tabs: • How to create animated...
⌚ Timestamps
00:00 - Introduction
0:50 - What we are starting with
01:37 - Using padding instead of gap
03:10 - Adding the underline with a pseudo-element
05:12 - Adding a basic animation on hover
06:50 - Making the line move to the right
09:35 - Making the line move to the left
11:28 - Cleaning things up with custom properties
12:50 - Improving the animation so that it slides
15:50 - Browser support for browsers that don’t support :has()
17:05 - This isn’t perfect!
#css
--
Come hang out with other dev's in my Discord Community
💬 / discord
Keep up to date with everything I'm up to
✉ www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
📺 / kevinpowellcss
---
Help support my channel
👨🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - code.visualstudio.com/
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my RU-vid channel, make sure to follow me on Instagram and Twitter.
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
28 июн 2024