Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> #main { width: 350px; height: 100px; border: 1px solid #c3c3c3; display: flex; } #main div:nth-of-type(1) {flex-grow: 1;} #main div:nth-of-type(2) {flex-grow: 1;} #main div:nth-of-type(3) {flex-grow: 1;} #myBlueDiv { -webkit-animation: mymove 5s infinite; /* Chrome, Safari, Opera */ animation: mymove 5s infinite; } /* Chrome, Safari, Opera */ @-webkit-keyframes mymove { 50% {flex-grow: 8;} } /* Standard syntax */ @keyframes mymove { 50% {flex-grow: 8;} } </style> </head> <body> <p>Gradually change the flex-grow property of the "blue DIV" from 1, to 8, and back to 1:<p> <div id="main"> <div style="background-color:coral;"></div> <div style="background-color:lightblue;" id="myBlueDiv"></div> <div style="background-color:khaki;"></div> </div> <p>The flex-grow property is <em>animatable</em> in CSS.</p> <p><b>Note:</b> CSS Animations do not work in Internet Explorer 9 and earlier versions.</p> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_anim_flex-grow by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:51:55 GMT --> </html>
Result:
Try it Yourself - © w3schools.com