Cut a CSS transition short?
问题 I'm applying a CSS transition to an element. target.style.transition = "color 10000ms ease"; target.style.color = "red"; Under certain circumstances, I want the end state of this transition to be reached immediately, without waiting for the transition to finish. If I try target.style.transition = "color 0ms"; target.style.color = "red"; the current transition just continues. Doing target.style.transition = "color 0ms"; target.style.color = "blue"; sets it to 'blue' immediately, while target