让目标对象滚动到视口位置

 

 dom.scrollIntoView({

        behavior:"smooth"(动画效果)

})

posted @ 2020-06-16 17:21  Miraitowa-  阅读(143)  评论(0)    收藏  举报