-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This adds horizontal scrollbar in responsive mode #3
Comments
Hi, You can check in Firefox what element is causing overflow in inspector: (Screen with |
This is true, the scrollbar is hidden, but it's still possible to do a horizontal scroll by tilting the mousewheel on PC or pulling the edges on mobile. This possibility disappears when the script is unloaded for some reason :o |
Then perhaps
|
That's because individual snowflakes are flowing outside screen border. When script is unloaded there is no element that could cause overflow. |
Does not seem to solve the issue either, unfortunately :( |
Then perhaps one of those solutions will work for you (You can also try using all of them ): In <meta name="viewport" content="width=device-width, initial-scale=1.0"> with <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> Additionally in let randomX = Math.random() * 90; // vw (90 vw instead of 100) Yet another solution would be to set snow div as relative with max-width: /* style.css | http://127.0.0.1:5500/style.css */
body {
/* overflow-x: hidden; */
}
/* Element | http://127.0.0.1:5500/ */
#snow {
overflow-x: clip;
max-width: 100vw;
position: relative;
} |
Greetings,
Whenever I add this, it adds a slight horizontal scroll to the website, and I cannot figure out why. I can see it on the demo aswell https://hyperstown.github.io/puresnowjs/
Any idea as to why this happens?
The text was updated successfully, but these errors were encountered: