so when the page first opens it is fully occupied by the first div, i then want it to shrink into four equal divs of different colours automatically. i have been trying to crack this for a while, here's my code so far:
div {
float: left;
}
#div1 {
width: 100%;
height: 100%;
background: #f24c43;
animation-name: shrink;
animation-duration: 4s;
}
#div2 {
width: 0%;
height: 0%;
background: #ffe605;
animation-name: grow;
animation-duration: 4s;
}
#div3 {
width: 0%;
height: 0%;
background: #e89b30;
animation-name: grow;
animation-duration: 4s;
}
#div4 {
width: 0%;
height: 0%;
background: #870e40;
animation-name: grow;
animation-duration: 4s;
}
<div id="div1">
</div>
<div id="div2">
</div>
<div id="div3">
</div>
<div id="div4">
</div>