Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
implement parallax scrolling #1443
This probably doesn't fit into the performance aspect of amp. It is however an often used stylistic effect to have images parallax scrolling. This, of course, doesn't work on mobile yet and is often a problem on desktop browser too so it would be challenging. However: a correct implementation could make this effect much more pleasant.
I imagine it like this:
<amp-parallax width="1200" height="630" layout="responsive"> <amp-img src="/image.jpg" width="1200" height="1260" layout="responsive"></amp-img> </amp-parallax>
Parallax can be set up via CSS and would work on Chrome fairly everywhere and on desktop Safari and Firefox.
However, it won't work in iOS Safari. The main reason, I believe, is not styling itself, but the way scrolling is implemented. That would be the main challenge implementing it there as well when the scroll events arrive significantly later.