问题描述
import React,{ useState } from 'react';
import { Affix,Button } from 'antd';
const Demo: React.FC = () => {
return (
<>
<div style={{ height: '5000px' }}>Tall Table</div>
<Affix offsetBottom={50}>
<Button type="primary">
Affix bottom
</Button>
</Affix>
</>
);
};
ReactDOM.render(<Demo />,mountNode);
基本上,我有一个超长的桌子,它延伸到视口之外。但是,添加 Affix
似乎没有任何作用。如何让 Button
位于浏览器视口的底部,直到我们滚动到表格底部(之后它位于表格下方)?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)