正在加载视频...

视频加载失败

Lil progress update ✨ (Scan lines are an animating pseudoelement with mix-blend-mode 🤙)

41,934 次观看 • 2 年前 •via X (Twitter)

10 条评论

Mike-麥-Mai-v1.618 的头像
Mike-麥-Mai-v1.6182 年前

I am amazed that it captured all the text rather than spitting out gibberish.

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

Right?! Did well with this one 🙌

William 的头像
William2 年前

can i try it yet?

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

Very close 🤏 Get your AI keys ready 😅 I want to open source the code so want that to be in good shape so people can use it for other things. There are React components for the different input types which can be handy in AI apps in general 🤙

Marc Backes 的头像
Marc Backes2 年前

I can’t wait to see what cool reveal animation you will do at the end 👀

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

Been thinking about some kind of stepped grid reveal like blocks dropping 😅

Aaron 的头像
Aaron2 年前

Uuuh I am loving this! When can we try it?

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

Will do my best to get something out this week 🙏 Jus' need to tidy up the UI and deploy it 🤙

Amy Dutton 的头像
Amy Dutton2 年前

😍 Brilliant

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

It's getting there 🙌

相关视频

CSS Tip! 💪 You can create these tab controls with CSS :has() + radio buttons ✨ .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } .tabs::after { translate: calc(var(--active, 0) * 100%) 0; width: calc(100% / var(--count)); } Two CSS :has() tricks here combined with a rendering trick 🤙 The tab control is a container using display: grid. You can use :has() to count the number of tabs in the container: .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(input:nth-of-type(4)) { --count: 4; } Using the cascade, the last valid :has() gives you the number of tabs 🫶 Once you know the number of tabs, you know how to size the indicator: .tabs::after { content: ""; position: absolute; height: 100%; width: calc(100% / var(--count)); } It's a pseudoelement that uses --count to determine its size 📏 The next :has() trick is determining which tab is active or :checked as it's an input [type=radio] .tabs:has(:checked:nth-of-type(2)) { --active: 1; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } You can use a zero-indexed translation here. If the second input is :checked, set --active: 1, then translate the pseudoelement on the tabs to that position 👉 .tabs::after { translate: calc(var(--active, 0) * 100%) 0; } The last rendering trick is using mix-blend-mode 👀 The tabs have a black background-color, the pseudoelement is white, and the label text is white. When you use mix-blend-mode: difference on the pseudoelement it will give this effect that the text transitions from white to black sliding across 😎 .tabs::after { color: hsl(0 0% 100%); mix-blend-mode: difference; } You can totally mix up the colors here though and go with a different effect. The mechanics of how you can use CSS :has() is the main point here 🙏 As always, any questions, suggestions, etc. let me know CodePen.IO link below! 👇 (There's even a Tailwind CSS play for this one too 👀)

jhey ʕ•ᴥ•ʔ

437,855 次观看 • 2 年前