jQuery实现点击某元素页面滚动到相应位置

jQuery实现点击某元素页面滚动到相应位置
点击某元素滚动到某个元素id的位置》

<div id="morecolor">让页面滚动到我这里来</div>
$('html , body').animate({scrollTop: $('#morecolor').offset().top}, 1000);

猜你喜欢

转载自blog.csdn.net/weixin_38483133/article/details/86534439
今日推荐