data-scroll =“top”在firefox中没有滚动到顶部

时间:2016-08-12 06:58:59

标签: jquery html css

我有一个锚标记,如下所示

<a data-scroll="top" class="show-overlay" href="#edit-event-announcement-1" ref="#edit-event-announcement-1"> Edit Announcement</a>

在Chrome中,它可以正常工作并滚动到顶部,但在Firefox中却没有。为什么呢?

1 个答案:

答案 0 :(得分:0)

我认为这可以在这里得到解答:Animate scrollTop not working in firefox

  

&#34; Firefox将溢出放在html级别,除非特别说明   风格表现不同。   要使其在Firefox中运行,请使用$('body,html').animate( ... ); ...&#34;

希望这会有所帮助,干杯!