antd modal 内容自动滚动
作者:
此昵称已被狗抢占 | 来源:发表于
2022-04-28 11:46 被阅读0次.container {
width: 100%;
height: 100%;
& :global .ant-modal {
height: 100%;
overflow: hidden;
}
& :global .ant-modal-content {
position: relative;
display: flex;
max-height: 100%;
flex-direction: column;
flex: 1;
overflow: hidden;
top: 50%;
transform: translateY(-50%);
}
& :global .ant-modal-body {
position: relative;
display: flex;
overflow: auto;
}
}
<Modal className="container" centered>
{/* ...很长的元素 */}
</Modal>
本文标题:antd modal 内容自动滚动
本文链接:https://www.haomeiwen.com/subject/chtdyrtx.html
网友评论