js:滚动到指定行

被滚动的行需要绑定唯一ID
document.getElementById('id')?.scrollIntoView({ behavior: 'smooth' })

 

posted @ 2021-11-04 17:03  a茶色  阅读(245)  评论(0)    收藏  举报