Re: transitions vs. animations

On Apr 7, 2010, at 5:04 PM, Håkon Wium Lie wrote:

> How would you like to fill in the empty boxes?:
> 
>   http://people.opera.com/howcome/2010/ta/index.html

I don't think it is fair to say that 3b is "not possible" with the current draft. You are already using an external script to make the class change, so it can do the rest also. So for instance, assuming the same CSS as in 3a:

if(myCondition){
	myElement.className = "two"
} else {
	myElement.className = "one"
	myElement.style.animation = "animation: bounce 0.2s 5" 
	// or myElement.className = "one three", where ".three" has the above style
}

For 3c you do the same thing, but in the CSS you add ',sway 1s 1s ' to the 'animation' property of ".two". 

I think.

Received on Thursday, 8 April 2010 17:02:24 UTC