Darrren Posted December 17, 2021 Share Posted December 17, 2021 Hi!! How to change the smoothscroll from <body> to <div>? Cause I need to set the <body> style "overflow:hidden". See the Pen gOgWELo by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted December 17, 2021 Share Posted December 17, 2021 Sorry, but that will not work with overflow hidden on the body. That code has to use the actual body for scrolling. You might be able to adjust the code, like changing any references to body to the container that would have the actual scrollbars, but I can say for certain how well it would work. document.body.style.height = height + "px"; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now