【发布时间】:2020-01-08 11:15:27
【问题描述】:
我有一个固定的顶栏,当我点击它时,页面会滚动到相应的部分。但是,它在我的 iphone8(ios13) 中滚动不顺畅,但在 chrome 和 android 中运行良好。 我尝试使用scrollIntoview,但它也不起作用。 这是代码
scrollToAnchor = tabIndex => {
window.scrollTo({
top: this.state.tabListTop[tabIndex] - 76,
behavior: 'smooth'
})
}
【问题讨论】:
标签: javascript html ios css frontend