Get the latest tech news

Can you convert a video to pure CSS?


Can you convert a video to pure css? Yes, yes you can. And this is how.

A css variable can be used to scrub the position of the animation and if set from js based on scroll works just like the timeline version. Next is to reduce this giant array of raw frame data down into several big monster css animation strings, one for each pixel. Interestingly, chrome does better with box shadow rendering so if it doesn't crash parsing the css string it ends up being smoother than safari.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of video

video

Photo of css

css

Related news:

News photo

Show HN: AI Tool Is Now Supporting React, Angular, CSS, Svelte, Vue

News photo

Electric Clojure v3: Differential Dataflow for UI [video]

News photo

If you can't code, remember this video