Add this to your HTML file:
html,
body {
min-height: 100vh;
display: flex;
flex: 1;
}
#root {
display: flex;
flex: 1;
}
Codesandbox
Then add flex: 1
to your root on line 25 of demo.js
In short: your body needs to be 100vh, then you can flex whatever you need to.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…