darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
7.33k stars 316 forks source link

Help, regarding custom wrapper and content, unable to scroll #312

Closed hengshanMWC closed 3 months ago

hengshanMWC commented 3 months ago

Describe the bug There is a scroll bar in the modal box, which prevents me from scrolling. I want to modify the wrapper and content

To Reproduce https://codepen.io/abmao/pen/gOyPXwm

clementroche commented 3 months ago

Lenis is meant to smooth any element that is already scrollable. In your codepen, #wrapper is not srollable, you must do it using CSS first otherwise Lenis does nothing.

#wrapper {
  height: 100vh;
  overflow: auto;
}
hengshanMWC commented 3 months ago

Lenis is meant to smooth any element that is already scrollable. In your codepen, #wrapper is not srollable, you must do it using CSS first otherwise Lenis does nothing.

#wrapper {
  height: 100vh;
  overflow: auto;
}

Thank you.