Загрузка видео...
Не удалось загрузить видео
CSS Tip! 💪 You can create these tab controls with CSS :has() + radio buttons ✨ .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } .tabs::after { translate: calc(var(--active, 0) * 100%) 0; width: calc(100% / var(--count)); } Two CSS :has() tricks here combined with a rendering trick... show more
437,300 просмотров • 2 лет назад •via X (Twitter)
Комментарии: 9

jhey ▲🐻🎈2 лет назад
Here's that @CodePen link! 🚀 Remember, CSS :has() is available in all the major browsers now 👀 It's a great time to start getting familiar with it ⭐️

toprakcavusdag.js2 лет назад
That's super. Thank you for sharing us

jhey ▲🐻🎈2 лет назад
More than welcome! 🙏

Kay 🇮🇪2 лет назад
Tried to find it for tailwind but no luck!?

Carlito2 лет назад
Sorcery!

JEM2 лет назад
still wrapping my head around :has() 😵💫

jhey ▲🐻🎈2 лет назад
Wrote this one in 2022 that might help 🤙 Got some much cooler demos to show off for it now though 😁

randomhuman2 лет назад
Beautiful 👌

Souvik Bhattacharjee2 лет назад
Nice 🔥
