Set the body element as follows: {code...} It has two sub-elements: {code...} so that the flex element can adapt to the height. It also contains two sub-elements: {code...} if the height of the flex element is 800 pixels, how can we fill the height of the two elements with the flex element? Set the body element as follows:
Display: flex; flex-direction: column;
It has two child elements:
In this way, the flex element can adapt to the height. It also contains two child elements:
If the height of the flex element is 800 pixels, how can we fill the height of the two elements with the flex element?
Reply content:
Set the body element as follows:
Display: flex; flex-direction: column;
It has two child elements:
In this way, the flex element can adapt to the height. It also contains two child elements:
If the height of the flex element is 800 pixels, how can we fill the height of the two elements with the flex element?
Set flex to an elastic box, which is vertical.