CSS Portal
Run
Search
« Back to
CSS flex-shrink Property
<p>The width of content is 500px; the flex-basis of the flex items is 120px.</p> <p>A, B, C have flex-shrink:1 set. D and E have flex-shrink:2 set</p> <p>The width of D and E is less than the others.</p> <div id="content"> <div class="box" style="background:red;">A</div> <div class="box" style="background:lightblue;">B</div> <div class="box" style="background:yellow;">C</div> <div class="box1" style="background:brown;">D</div> <div class="box1" style="background:lightgreen;">E</div> </div>
If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!
☕ Buy a Coffee