CSS flex

Previous Next

Demo of the different values of the flex property.

Click the property values below to see the result:

flex: 0 1 150px;
flex: 0 0 50px;
flex: 3 0 auto;
flex: 0 3 auto;

Change the flex property of the BLUE div:

red div
blue div
yellow div
pink div

Change the flex property of the BLUE div:

red div
blue div
yellow div
pink div

Change the flex property of the BLUE div:

red div
blue div
yellow div
pink div

Change the flex property of the BLUE div:

red div
blue div
yellow div
pink div

Play more with the code in our Tryit yourself editor: Try it Yourself ❯