正在加载视频...
视频加载失败
CSS Trick 🤙 You can mask other elements with icons in CSS to create this glittery icon hover/interaction effect ✨ canvas { mask: url(/img/icons/next.svg); } Check this example, inspired by the new Vercel homepage treats that are dropping 🖤 (Had to have a go at whipping this up over... show more
210,440 次观看 • 2 年前 •via X (Twitter)
10 条评论

Here's that @CodePen link! 🚀 This includes the exploded view stuff 💣

If you want a standalone version, this one's got you! 👇

@vercel What's a snovra?

@vercel I did not see this until I posted it 🤦♂️ Now people are pointing it out, I can't unsee it 😂

@vercel I think this effect will look even better with this icons

@vercel It does look cool! 💯👍

@vercel Beautiful 😍 Are there performance aspects to consider with multiple canvas elements?

For sure! 💯 And that's why I only activate the canvas particles on pointerenter and pointerleave ✨ GSAP has a great utility for this called gsap.ticker where you can control the fps as well as easily add and remove things to the ticker when needed 😎 It saves having to manage requestAnimationFrame yourself 🙌

@vercel Too cool

@vercel Now I've got to get back to that tear strip 😩😂
