Loading video...

Video Failed to Load

Go Home

CSS card parallax with pointermove + custom props 🧑‍🍳 <div class=ring style="--i: 2"> .ring { translate: calc(var(--px) * (var(--i) * -2rem)) calc(var(--py) * (var(--i) * 2rem)); } trick: pointer mapping to rotate card in 3D + translate rings 2D for the illusion 🤙 check it 👇

307,288 views • 11 months ago •via X (Twitter)

39 Comments

Lúcás's profile picture
Lúcás11 months ago

Just needed to wait for the legend to catch in this . You’re cooking!

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

i was baited in with the tags haha 😅

Fede's profile picture
Fede11 months ago

man you're crazy. it looks better than the prototype

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

too kind Fede 🤙 fun one to build!

Yadu's profile picture
Yadu11 months ago

That's crazy

pedro costa — oss/acc's profile picture
pedro costa — oss/acc11 months ago

i’m convinced you are literally a wizard

Dominik Scholz's profile picture
Dominik Scholz11 months ago

love it!

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

thank you sir! 🙏

Muheer's profile picture
Muheer11 months ago

Css god 🙏🏻

₿ruta | Yordan Hristov's profile picture
₿ruta | Yordan Hristov11 months ago

wait what how.... Are you thinking in algebra?

Seb Cornelius's profile picture
Seb Cornelius11 months ago

Hell yeah

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

lovely design Seb, couldn't resist 🤙 saw some people asking for CSS versions, got tagged, threw it together quick before bed 😅

Seb Cornelius's profile picture
Seb Cornelius11 months ago

Always love your stuff Jhey - feel free to build literally anything I make. Maybe we can collab on something dope in the future.

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

thanks Seb, appreciate that 🙏 these card designs are really neat that would be awesome 🤙 (love things like this design because you can bring them to life with not too much code, it's like this one 👇)

Seb Cornelius's profile picture
Seb Cornelius11 months ago

Thats rad

Chuks Gabriel's profile picture
Chuks Gabriel11 months ago

👒 up...

Mauro's profile picture
Mauro11 months ago

🐐

bfuzzy's profile picture
bfuzzy11 months ago

dope.

Senegal Coupe Du Monde 2030 (svp) 🇸🇳🇫🇷's profile picture
Senegal Coupe Du Monde 2030 (svp) 🇸🇳🇫🇷11 months ago

You are literally a wizard

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

@ved_aida tryin' 🫡

Ajay Patel's profile picture
Ajay Patel11 months ago

So creative, looks really good

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

jus' tappin' into some tricks i've been sharing, it was good timing 😅

Anko Painting's profile picture
Anko Painting11 months ago

How do you populate px? Js?

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

that's from pointermove/deviceorientation and maps from -1 to 1 on both axis (shown in video kinda) that then gets passed into CSS so it can do what it wants with the value 🤙

Elliot Otoijagha's profile picture
Elliot Otoijagha11 months ago

Are you the God of CSS? 😭😭

jhey ʕ•ᴥ•ʔ's profile picture
jhey ʕ•ᴥ•ʔ11 months ago

@Ellydev0 haha – never!

⤴️🅰️💲🟡N's profile picture
⤴️🅰️💲🟡N11 months ago

like this?

Jargon is Easy's profile picture
Jargon is Easy11 months ago

Hats Off! Buddy @SebCornelius and @jh3yy

Django's profile picture
Django11 months ago

Wow bro it’s really good ,come on I want to know how to get it

cubiq's profile picture
cubiq11 months ago

so wish that wed get preserved 3d even when the overflow is clipping the contents.. but these illusion hacks are cool enough <3 great job as always, Jhey!

Akshat Goel's profile picture
Akshat Goel11 months ago

jhey blazzing fast 😭

Dennis H. A. van Leeuwen 🕹's profile picture
Dennis H. A. van Leeuwen 🕹11 months ago

Cool

Ditectrev's profile picture
Ditectrev11 months ago

Crazy🤯

NegiDesign's profile picture
NegiDesign11 months ago

🔥🔥🔥

Tee Godwin's profile picture
Tee Godwin11 months ago

Crazy stunting!

Anand Patel's profile picture
Anand Patel11 months ago

It looks stunning bro!!!

cubiq's profile picture
cubiq11 months ago

Just experimented with getting the perspective right, no hacks, actually proper, configurable perspective <3 ill make prettier looking demo and share it when it's done 🤍 (not a single line of js btw)

ikhwanb's profile picture
ikhwanb11 months ago

Brilliant

Sosaingram's profile picture
Sosaingram11 months ago

That's a very interesting one

Related Videos