[英]Making an Angular Material 2 (Version 5.2.2) FAB stick in bottom right corner
[英]React & Material UI: Position <IconButton> on bottom right of <Paper> (No FAB)
問題:
我有一個 react/material-ui 實現,我想在其中顯示一個浮動在紙張右下角的編輯圖標。 我已經弄清楚如何讓它漂浮在整個屏幕的右下角,但這不是我在這里的目標。
當前行為:
讓圖標按鈕浮動在紙組件的右下角。
<Paper classnName={classes.paper}>
<IconButton
onClick={handleVisionEditCick}
style={{ position: "???", bottom: 3, right: 3 }}
>
<EditIcon className={classes.EditIcon} />
</IconButton>
<Typography variant="h5" component="span" color="textPrimary">
{vision}
</Typography>
</Paper>
這可能不是最好的解決方案,但您可以嘗試使用 Grid
<Grid container justify="flex-end" alignItems="flex-end">
<IconButton style={{ bottom: 3, right: 3 }}>
<Edit className={classes.EditIcon} />
</IconButton>
</Grid>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.