admin管理员组文章数量:1434900
I am working on a WordPress website that a client came to me with. He is requesting that all scroll speeds for anchors links match.
If you go to the home page here: / and click on Learn More under LET THE ADVENTURE BEGIN. The page scrolls down to the next section nicely.
Now if I click on Write Review next to the stars in a product (/) it just jumps to the bottom instantly. The client wants the scroll for the first link.
First, how to I change the scroll speed?
Second, will it even work? The reviews e from a third party called Yotpo. Is it possible to change the scroll speed on this link that is embedded from third party software?
I am working on a WordPress website that a client came to me with. He is requesting that all scroll speeds for anchors links match.
If you go to the home page here: https://www.lakeshoresup./ and click on Learn More under LET THE ADVENTURE BEGIN. The page scrolls down to the next section nicely.
Now if I click on Write Review next to the stars in a product (https://www.lakeshoresup./product/pathfinder/) it just jumps to the bottom instantly. The client wants the scroll for the first link.
First, how to I change the scroll speed?
Second, will it even work? The reviews e from a third party called Yotpo. Is it possible to change the scroll speed on this link that is embedded from third party software?
Share Improve this question edited Jan 19, 2022 at 13:55 Kalnode 11.5k3 gold badges40 silver badges74 bronze badges asked Oct 7, 2020 at 16:10 MattMatt 3211 gold badge6 silver badges17 bronze badges 1- FYI, the answers don't actually give you control over scroll speed, they merely apply a default browser speed. – Kalnode Commented Jan 19, 2022 at 13:55
2 Answers
Reset to default 6you can add in css a general scroll behavior for the entire website to scroll smoothly like:
* {
scroll-behavior: smooth;
}
You can use smooth scroll behavior. It's enable smooth scrolling for the whole page.
html {
scroll-behavior: smooth;
}
本文标签: javascriptSmooth scrolling when clicking Anchor LinkStack Overflow
版权声明:本文标题:javascript - Smooth scrolling when clicking Anchor Link - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745628289a2667110.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论