CSS, Web, Web Development, Layout.
/*main区域高度的基准值为main内容自动高度*/ } For more details on this, read Illustrated CSS: Flexbox Layout (Part 2). If you want to save trouble, you can explicitly set flex-grow: 1 on main , because the default values for flex-shrink and flex-basis are 1 and auto . In CSS Grid layout, we can use 1fr to make the