Re: transitions vs. animations

On Apr 9, 2010, at 1:25 AM, Håkon Wium Lie wrote:

>> 2b) 
>> foo { 
>> 	position:static; 
>> 	transition: position 1s / bounce 1s; 
>> }
>> foo:hover { position:relative; }
> 
> I don't undertand how this example works. How does it make 'bounce' be
> played on hovering and un-hovering? Are you using the change in the
> 'position' property as a dummy just to trigger some change?

Yes. Since the non-zero rounds to one, the position should change to "relative' within one "frame" or millisecond or whatever after transition begins, thus allowing the 'transition-animation' (the part after the slash) to move.

At least, that's the theory. I could have done the same thing a transition between opacity:1 and opacity:0.999, or something else which would not be noticeable by a human. But that seemed more likely to illicit charges of being too-hackish, which I will probably now receive anyway.

Received on Friday, 9 April 2010 14:21:26 UTC