// 锚点滑动
Menu.goSlide = function () {
document.querySelectorAll('.link_a').forEach(function (el) {
el.addEventListener('click', function () {
var target = document.querySelector('div[data-tab=' + this.getAttribute('data-tab') + ']')
target.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" })
})
})
}
结构
image.png
image.png











网友评论