原文链接:http://*.com/questions/8149155/animate-scrolltop-not-working-in-firefox
This function works fine. It scrolls the body to a desired container's offset
But not in Firefox. Why? -EDIT- To handle de double trigger in the acepted answer, I suggest stoping the element before the animation:
|
Firefox places the overflow at the To get it to work in Firefox, use
The CSS solution would be to set the following styles:
I would assume that the JS solution would be least invasive. |