How does flex fix the head and scroll the content area?

question: similar to the functions that can be achieved by using position:fixed on the PC side.


  

I usually give the head a fixed height, and then the content page gives height: calc (100%-head height); overflow-y: scoll;. So why use flex to achieve this?

Menu