我正在使用 ant 设计步骤来制作视频进度步骤。我想滚动到与步骤号匹配的特定视频组件。就像我点击到第 3 步一样,那么具有 3rd id 的元素应该滚动并出现在顶部。这是我的代码。
我希望它像这样工作我的滚动应该如何工作
<Col xl={6} lg={6} md={4} sm={24} xs={24}>
<Card
className='fixedDivWrapper'
style={{ width: "35vh", marginLeft: "5vw", marginBottom: "20vh" }}
>
<div
style={{
overflow: "auto",
height: "80vh",
}}
id='style'
>
<Steps current={current} onChange={onChange} direction='vertical'>
<Step title='Sans Tutorials 1' />
<Step title='Sans Tutorials 2' />
<Step title='Sans Tutorials 3' />
<Step title='Sans Tutorials 4' />
<Step title='Sans Tutorials 5' />
<Step title='Sans Tutorials 6' />
<Step title='Sans Tutorials 7' />
<Step title='Sans Tutorials 8' />
<Step title='Sans Tutorials 9' />
<Step title='Sans Tutorials 10' />
<Step title='Sans Tutorials 11' />
<Step title='Sans Tutorials 12' />
<Step title='Sans Tutorials 13' />
<Step title='Sans Tutorials 14' />
</Steps>
</div>
</Card>
</Col>
<Col
style={{ textAlign: "left" }}
xl={18}
lg={18}
md={20}
sm={20}
xs={20}
>
<Element id='1'>
<HelpVideo />
</Element>
<Element>
<HelpVideo id='2' />
</Element>
<Element>
<HelpVideo id='3' />
</Element>
<Element>
<HelpVideo id='4' />
</Element>
<Element>
<HelpVideo id='5' />
</Element>
<Element>
<HelpVideo id='6' />
</Element>
<Element>
<HelpVideo id='7' />
</Element>
<Element>
<HelpVideo id='8' />
</Element>
</Col>
</Row>