How to center a component in Material-UI and make it responsive?
问题 I don't quite understand the React Material-UI grid system. If I want to use a form component for login, what is the easiest way to center it on the screen on all devices (mobile and desktop)? 回答1: Since you are going to use this in a login page. Here is a code I used in a Login page using Material-UI <Grid container spacing={0} direction="column" alignItems="center" justify="center" style={{ minHeight: '100vh' }} > <Grid item xs={3}> <LoginForm /> </Grid> </Grid> this will make this login