繁体   English   中英

如何在 Material UI 按钮的角落放置一个图标

[英]How to put an icon on in the corner of a Material UI button

如何将图标放在 Material UI 按钮的角落以做出反应?

现在我拥有的是这个,图标就在标题旁边。 我希望将图标移动到按钮的右下角......知道如何实现这一点吗? 谢谢!

export default function CardButton() {
    return (
        <Button
            variant="contained"
            style={{
                height: 220,
                width: 275,
                margin: '1vh',
            }}
            color="secondary"
        >
            <Typography variant="button" style={{fontSize:'24px'}}>title</Typography>
            <AddIcon/>
        </Button>
    )
}

在此处输入图像描述

使用position: absolute为 position 图标。

https://stackblitz.com/edit/react-ts-a6phy9

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM