Загрузка видео...
Не удалось загрузить видео
Future CSS && UI Tip! ⚡️ You could use View Transitions to create those word carousel-type effects 😍 span:nth-of-type(2) { view-transition-name: swap; } ::view-transition-old(swap) { animation-name: slide-down; } ::view-transition-new(swap) { animation-name: slide-up; } How To 1. Create a paragraph split into spans 2. Set an interval in JavaScript that... show more
230,052 просмотров • 2 лет назад •via X (Twitter)
Комментарии: 9

Here's that @CodePen link! 🚀 Remember. This will only work in Chromium at the moment 🤓

And here's the @ChromiumDev issue that got raised from making this demo 🤙 (Fix rolling out into Chrome) Another example of why making random demos can help the <web platform/> 💯 Make things. Raise bugs. Share stuff! 🤓

Safari be like

Just made exactly this, this afternoon 🔥

This is nice. I used to do this in js. I’m always inclined to css solution before get to javascript. Bookmarked

It doesn't render properly on my version of Chrome. When it slides in, all of the words are too small, and then after a delay they size back up to the correct height!

Yep – I'm not sure it's quite rolled out to everyone on Chrome yet. It should work as expected in Canary. Look out for that Chrome update 🤙

amazing 👏

@SaveToNotion

