Answer the question
In order to leave comments, you need to log in
How to remove the delay between setTimeout and setInterval cycles with constant animation-css?
Hello, there is an animation that lasts 1 second:
.anim-elem{
transform: translateX(6017.75px);
transition: transform 1000ms linear 0s;
}
setInterval(function timeInterval() {
/**
ВЫсчитываем новую позицию и подставляем её. Так же тут много всяких действий и иных рассчётов
**/
$(".anim-elem").css('transform', 'translateX('+position_x+'px)');
}, 1000);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question