Skip to content
0:000:26
Rank#07

Post by jhey ʕ•ᴥ•ʔ

Jʔ

jhey ʕ•ᴥ•ʔ

@jh3yy

Open on X

CSS Tip! 🤙 You can create this magnetic :hover effect with CSS anchor positioning, :has, and zero JS 🔥 article { anchor-name: --develop; } ul:has(li:hover) { --anchor: --develop; } ul::after { inset: anchor(var(--anchor) top) anchor(var(--anchor) right)

Why it is here

A magnetic hover highlight built with anchor positioning and :has(), no JavaScript involved.

Likes
4,7954.8K
Replies
43
All-time rank
#7
Week
W442023
Went viral
Posted on X
Interaction#css#anchor-positioning#hover

The digest

Get posts like this in your inbox every morning.

Get Pro
See the category
Post by lochie: It's time to bring Haptics to the web 🫨
Create custom tactile patterns with strengths + durations for your web interact
0:26
LO

lochie

@lochieaxonInteraction

Likes:9.3K
Post by jhey ʕ•ᴥ•ʔ: css holographic trading card breakdown 🧑‍🍳

a combo of masked layers with mix-blend-mode

pointer position drives the
0:33
Jʔ

jhey ʕ•ᴥ•ʔ

@jh3yyWeb

Likes:1.1K