Reactjs smooth window.scrollBy()在ios中无法正常工作,它使跳转无法滚动
我使用的是window.scrollBy(),它在pc机上运行得非常好,但在手机上却会出现跳跃。 这是我打电话的一个例子Reactjs smooth window.scrollBy()在ios中无法正常工作,它使跳转无法滚动,reactjs,react-native,jsx,react-bootstrap,Reactjs,React Native,Jsx,React Bootstrap,我使用的是window.scrollBy(),它在pc机上运行得非常好,但在手机上却会出现跳跃。 这是我打电话的一个例子 scrollTextAboutUs= () => { var scrollTo=document.getElementById("AboutUs").getClientRects()[0].y-this.state.headerHeight window.scrollBy({top: scrollTo, left: 0, behavior: 'smoot
scrollTextAboutUs= () => {
var scrollTo=document.getElementById("AboutUs").getClientRects()[0].y-this.state.headerHeight
window.scrollBy({top: scrollTo, left: 0, behavior: 'smooth'})
}
这是我的全部这是我的全部