The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Parallax reveal image with curve Reply To: Parallax reveal image with curve


Ok, here it is: Codepen

I’ve edited my code and found a solution using absolute positionning which works. But if you still have a cleaner way to do it, it can be interesting :)

The other problem I have with this code is with the scroll step. If you scroll smoothly, with arrow keys or clicked mousewheel it’s ok, but if you scroll using the mousewheel, the step of scroll (actually it’s 100px in Chrome on my system) makes the bottom of the animation being cut by the border (because the onePosY and twoPosY aren’t exactly 100).