Answer the question
In order to leave comments, you need to log in
How do flex-grow: 1 and flex-shrink: 1 set at the same time work? Don't they contradict each other?
Sometimes in the code I saw this:
flex-grow: 1;
flex-shrink: 1;
Answer the question
In order to leave comments, you need to log in
flex-grow sets the behavior of child elements when the width of the container is greater than the total width of the children, roughly speaking how they will occupy the space that has appeared
flex-shrink sets the behavior when the width of the container is less than the total width of the child elements, roughly speaking how the children will behave elements, when there is not enough space for everyone, who will shrink how
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question