正在加载视频...

视频加载失败

Update... All you need is this for a CSS-only magnetic link effect 🤯 li:has(a:is(:hover, :focus-visible)) {anchor-name: --a; } ul::before { left: anchor(--a left); width: anchor-size(--a width); } Create an anchor on hover, makes sense! 🤦‍♂️ h/t @yassi_lah for the push 🤙

194,760 次观看 • 2 年前 •via X (Twitter)

8 条评论

jhey ▲🐻🎈 的头像
jhey ▲🐻🎈2 年前

This one is an absolute gift IMO 🎁 Nukes a lot of JS There are also a couple of other CSS Anchor Positioning pieces that once they get implemented will streamline things a little more 🤏

Le Dev ULTIME 的头像
Le Dev ULTIME2 年前

@yassi_lah what do you use for the animation zooms etc?

Azat S. 的头像
Azat S.2 年前

@yassi_lah Waiting for support 😀

Andy Ingram 🌀 的头像
Andy Ingram 🌀2 年前

@yassi_lah That’s how the one I shared earlier works

jhey ▲🐻🎈 的头像
jhey ▲🐻🎈2 年前

@yassi_lah You could have that in a sense though, right? For <nav> related anchors, you could reserve the name --nav-anchor for example. You're only going to be using it at any one time as you wouldn't be able to hover multiple navs at once 🤔

Jorge Baumann.js 的头像
Jorge Baumann.js2 年前

@yassi_lah 🥹 Can you stop posting so many cool demos? 😵 I can't follow you haha

joseph morgan 的头像
joseph morgan2 年前

@yassi_lah Damnnn @jh3yy just makes day better 🥺❤️

daniel feles 的头像
daniel feles2 年前

@yassi_lah simple and clean :)

相关视频