簡體   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