简体   繁体   中英

How do I achieve this smooth scroll effect?

so this issue has been driving me absolutely insane for a few days now and I can not seem to find an answer. I want to achieve this scroll effect Here . However, I am also wondering if my scroll speed is only choppy on local.

First I'm thinking it may be my scroll speed on my mouse settings so I have been playing around with them, however when I scroll on my web pages I am developing locally the scrolling is choppy. Firefox is decent but still a little choppy. My laptop with just using the touch pad is a much smoother scroll.

I notice whenever I am on any other site whether it's using Firefox, Chrome, etc. the sites have a nice smooth scroll, not choppy and it almost seems as if the scroll transitions nicely and is somewhat delayed. My mouse is instant locally. I know I am all over the place here, but does anyone have an idea of what this issue may be? Is the scroll speed different locally vs hosted?

I want to achieve the page scrolling smoothly throughout, not just 100vh and using a full page scroll plugin.

Check this out

 html { scroll-behavior: smooth; } 

Refer: https://www.w3schools.com/howto/howto_css_smooth_scroll.asp#section1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM