kik*_*unk 13 firefox jquery scroll google-chrome cross-browser
我有下面的代码,在chrome中运行良好.
但是,它不适用于Firefox和IE.什么都没发生.
$("body").animate({scrollTop:$(this).offset().top},800);
Run Code Online (Sandbox Code Playgroud)
所以我可以问我应该为firefox和IE写什么?
谢谢.
rah*_*hul 36
尝试使用
$('body,html').animate({scrollTop:$(this).offset().top},800);
Run Code Online (Sandbox Code Playgroud)
代替
$("body").animate({scrollTop:$(this).offset().top},800);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18952 次 |
| 最近记录: |