<Content className={style.content} style={{ maxHeight: 'calc(100vh - 175px)',overflowY:"auto" }} id ='handelDocID'> <BackTop visibilityHeight={300} target ={()=>document.getElementById('handelDocID')} > <div className={style.backTopInner}>UP</div> </BackTop> </Content> 將<BackTop>放在加滾動條的元素的子級裏,不是孫子級及後代元素裏面