正在加载视频...

视频加载失败

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,229 次观看 • 1 年前 •via X (Twitter)

9 条评论

Ahmed ALABSI ❁ 的头像
Ahmed ALABSI ❁1 年前

You can generate custom easing functions for css using this tool PSA: the website is not mobile friendly

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

Made my own for CSS conversion 🤙

Charlie Joseph 的头像
Charlie Joseph1 年前

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

Pablo Stanley 的头像
Pablo Stanley1 年前

such a little but awesome detail 😊

Arman Kazi 的头像
Arman Kazi1 年前

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

Cypher 的头像
Cypher1 年前

So pretty

Enicma 的头像
Enicma1 年前

Nice trick! What about mobile devices?

Sa-Senpai 的头像
Sa-Senpai1 年前

aha ! how come I didn't think of this before !

EIO 的头像
EIO1 年前

Brilliant! 😅

相关视频