1. Flex-shrink refers to the shrinkage ratio of a single element when the flex container is out of space.
2. Negative values are not supported. The default value is 1, which means that all flex items will shrink by default. If set to 0, it means no shrinkage and the original width is maintained.
Example
// CSS part.content{ display: flex; width: 400px; height: 200px; border: 1px solid; } .left, .center, .right{ height: 200px; } .left{ width: 100px; background-color: aqua; } .center{ width: 200px; background-color: bisque; } .right{ width: 300px; background-color: cadetblue; }
The above is an introduction to the flex-shrink attribute in CSS. I hope it will be helpful to everyone.