当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - $.animate works only in Chrome but not in Mozilla

问题描述:

This script is not working in Mozilla

$('body').animate({ scrollTop: $("body").find(".Pickup").offset().top - 200 }, 'slow');

What i have to do?

网友答案:

Firefox places the overflow at the html level, unless specifically styled to behave differently.

To get it to work in Firefox, use

$('body,html').animate( ... );
分享给朋友:
您可能感兴趣的文章:
随机阅读: