Animate CSS flex-shrink property

To implement animation on flex-shrink property with CSS, you can try to run the following code


Live Demo

<!DOCTYPE html>
         .mycontainer {
            display: flex;
            background-color: orange;
         .mycontainer > div {
            background-color: white;
            text-align: center;
            line-height: 150px;
            font-size: 30px;
            width: 100px;
            margin: 5px;
         div {
            animation: myanim 4s infinite;
         @-webkit-keyframes myanim {
            70% {
               flex-shrink: 1;
      <div class = "mycontainer">
         <div style = "flex-shrink: 0">Q4</div>