javascript - Cut a CSS transition short? -
i'm applying css transition element.
target.style.transition = "color 10000ms ease"; target.style.color = "red"; under circumstances, want end state of transition reached immediately, without waiting transition finish.
if try
target.style.transition = "color 0ms"; target.style.color = "red"; the current transition continues.
doing
target.style.transition = "color 0ms"; target.style.color = "blue"; sets 'blue' immediately, while
target.style.transition = "color 0ms"; target.style.color = "blue"; target.style.color = "red"; results in continuation of transition. (tried in both chrome , ff)
is there way stop transition?
Comments
Post a Comment