Video wird geladen...
Video konnte nicht geladen werden
Directional aware CSS button :hover w/ lh, text-shadow, and linear() button:has(span:nth-of-type(2):hover) { --y: -1lh; } button span:first-of-type { translate: 0 var(--y); transition: translate .875s var(--spring); text-shadow: 0 1lh currentColor, 0 -1lh currentColor; }
40,389 Aufrufe • vor 2 Jahren •via X (Twitter)
9 Kommentare

Ahmed ALABSI ❁vor 2 Jahren
You can generate custom easing functions for css using this tool PSA: the website is not mobile friendly

jhey ▲🐻🎈vor 2 Jahren
Made my own for CSS conversion 🤙

Charlie Josephvor 2 Jahren
I didn’t realise native CSS had spring animations now! I always thought it was a JS thing

Pablo Stanleyvor 2 Jahren
such a little but awesome detail 😊

Arman Kazivor 2 Jahren
Can you make this transition from one direction every time you hover it ?and not reversing when u hover the second time

Cyphervor 2 Jahren
So pretty

Enicmavor 2 Jahren
Nice trick! What about mobile devices?

Sa-Senpaivor 2 Jahren
aha ! how come I didn't think of this before !

EIOvor 2 Jahren
Brilliant! 😅
