Is it possible in CSS to transition through a third color when using a hover transition?
问题 I have an element that is red in resting state, and green when the user hovers their cursor over it. I have it set to ease the transition for 0.4s . Instead of having the colour transition straight from red to green, I'd like it to pass through yellow at the midway point. So when the user mouses over it, it goes from red to yellow to green in one smooth transition. Is this possible? This is my current code. .element { background-color: red; -webkit-transition: all 0.4s ease; transition: all 0