正在加载视频...

视频加载失败

A really cool feature of the View Transitions API (available now in stable Chrome!) is that videos and animations on the new view continue to play smoothly while transitioning. With a bit of extra JavaScript, you can even do this with elements shared across different routes ✨

351,273 次观看 • 3 年前 •via X (Twitter)

10 条评论

Maxi Ferreira 的头像
Maxi Ferreira3 年前

Like previous demos, this is an @astrodotbuild site using the Navigation API as a client-side router. On non-Chrome browsers it works as a regular MPA. Demo and source 👉🏽 Big thanks to @jaffathecake for the tip on how to do the smooth video transition.

Maxi Ferreira 的头像
Maxi Ferreira3 年前

Full credits for the UI go to designer Ehsan Rahimi 🙏 Their wonderful Dribbble shot was what inspired this demo

Jake Archibald 的头像
Jake Archibald3 年前

For folks following along, here's how to do it:

Joe Previte 的头像
Joe Previte3 年前

holy cow, this is so smooth! is this repo open source?

Maxi Ferreira 的头像
Maxi Ferreira3 年前

Yes! You can play with the demo here as well (need to use latest Chrome)

Jake Ruesink 的头像
Jake Ruesink3 年前

Would be really cool to see a demo video of how this API works. @wesbos or @stolinski maybe? Or a good segment for @syntaxfm at least. Who else does good demos that should see this?

Steren 的头像
Steren3 年前

Wow, I thought the View Transition API was allowing to manipulate a *static screenshot* of the old and new view. But it's actually not static? Game changer.

Una 🇺🇦 的头像
Una 🇺🇦3 年前

Nice demo!

Maxi Ferreira 的头像
Maxi Ferreira3 年前

Thanks, Una! 🙌🏽

Ben Holmes 的头像
Ben Holmes3 年前

Your view transition demos keep getting cooler 😮

相关视频