javascript - Smooth scrolling when clicking Anchor Link - Stack Overflow

I am working on a WordPress website that a client came to me with. He is requesting that all scroll spe

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
Add a ment  | 

2 Answers 2

Reset to default 6

you 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;
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745628290a4636945.html

相关推荐

  • javascript - Smooth scrolling when clicking Anchor Link - Stack Overflow

    I am working on a WordPress website that a client came to me with. He is requesting that all scroll spe

    12小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信