I'm applying bounce effect on a set of divs, making each bounce one after the other using animation delay.I want to repeat the sequence immediately after the last row animation is completed, please help me on this issue. Find the code below. What I did was, calculated the total of animation delay and set it as animation duration, however the iteration seems to take place after quite a delay. How to ensure that the iteration repeats immediately after the last row animation is completed?
//Style.css
.detail-container .row {
-webkit-animation-name: bounce;
animation-name: bounce;
-webkit-transform-origin: center bottom;
-ms-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-duration: 35s;
animation-duration: 35s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
animation-iteration-count:infinite;
-webkit-animation-iteration-count:infinite;
}
@-webkit-keyframes bounce {
0%, 0.571%, 1.514%, 2.285%, 2.857% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
1.142%, 1.228% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -30px, 0);
transform: translate3d(0, -30px, 0);
}
2% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -15px, 0);
transform: translate3d(0, -15px, 0);
}
2.571% {
-webkit-transform: translate3d(0,-4px,0);
transform: translate3d(0,-4px,0);
}
}
@keyframes bounce {
0%, 0.571%, 1.514%, 2.285%, 2.857% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
1.142%, 1.228% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -30px, 0);
transform: translate3d(0, -30px, 0);
}
2% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -15px, 0);
transform: translate3d(0, -15px, 0);
}
2.571% {
-webkit-transform: translate3d(0,-4px,0);
transform: translate3d(0,-4px,0);
}
}
.detail-container .row:nth-child(2){
animation-delay:2s;
}
.detail-container .row:nth-child(3){
animation-delay:3s;
}
.detail-container .row:nth-child(4){
animation-delay:4s;
}
.detail-container .row:nth-child(5){
animation-delay:5s;
}
.detail-container .row:nth-child(6){
animation-delay:6s;
}
.detail-container .row:nth-child(7){
animation-delay:7s;
}
.detail-container .row:nth-child(8){
animation-delay:8s;
}