【发布时间】:2017-03-15 07:17:46
【问题描述】:
您好,我无法在 Chrome 中平滑滚动。在其他浏览器中运行良好。它将转到锚点但没有平滑滚动。我还根据 chrome://flags/ 启用了滚动
jquery:
jQuery('.arrow-down').on('click',function (e) {
e.preventDefault();
var target = this.hash,
jQuerytarget = jQuery(target);
jQuery('html, body').stop().animate({
'scrollTop': jQuerytarget.offset().top - 60
}, 1500, 'swing', function () {
window.location.hash = target;
});
});
HTML:
<a href="#articleblock1" class="btn arrow-down"><div>SCROLL DOWN</div><i class="fa fa-angle-down" style="line-height:15px;font-size:30px;"></i></a>
【问题讨论】:
标签: jquery html google-chrome scroll scrolltop