getElementById
传入对应的DOM id 即可
document.getElementById(id).scrollIntoView({ block: 'start', behavior: 'smooth' })
getElementById
传入对应的DOM id 即可
document.getElementById(id).scrollIntoView({ block: 'start', behavior: 'smooth' })
本文标题:vue 锚链接平滑滚动
本文链接:https://www.haomeiwen.com/subject/gwtlsktx.html
网友评论