electerious / basicScroll

Standalone parallax scrolling for mobile and desktop with CSS variables.
https://basicscroll.electerious.com
MIT License
3.63k stars 148 forks source link

Set scrolling element to something other than the window #67

Open rgon opened 2 years ago

rgon commented 2 years ago

Hello everyone! Is there a way to change what the scrolling container is from the default (window)?

The main use case I see is a website where the view is wrapped in a scrolling div (and so, the window/document isn't scrolling). In my case, I'm doing this to have a css perspective on the scrolling div but still being able to have a position: fixed; background below.

rgon commented 2 years ago

No, there isn't a way. I have just implemented it in PR #68