Is it possible to get at what stage of CSS transition the object is with Javascript, without using an interval, or rely on the starting timestamp? I know that transitions can be pulled together, but I would prefer to avoid this if I can.
For example, for a div going through the following transition:
@keyframes example {
0% {background: red;}
50% {background: blue;}
100% {background: yellow;}
}
Is it possible to determine if a div is between 0% and 50%? Pure Javascript please.
source
share