How did they do those effects in http://artofflightmovie.com/?

后端 未结 4 779
生来不讨喜
生来不讨喜 2021-01-03 10:38

I have been trying to understand how they did those effects in http://artofflightmovie.com/ with no success so far. I am not even sure what to google for for help. Could any

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-03 11:22

    the whole page is an "overlay" - a full width and height wrapper

    . sort of how modal windows do their "full page shadow" effect and have a small div float inside. the whole page content is in that wrapper. the scroll path is a script. the script captures the body scroll and moves the contents of the div accordingly to the positions provided by the script. with a body long enough to be scrollable (which cannot be seen since the wrapper covers the whole page), it's as if you are scrolling sideways, upwards etc.

    an analogy is a modal window. the wrapper is the full-page shade. the modal window is the content. and notice how modal windows stick to the middle? that's using a script to calculate it's position to stay in the middle by moving the modal window down, relative to the page's top. but in that website's case, they move in different directions.

提交回复
热议问题