Re: [css3-animations] Effect of display:none and visibility:hidden on animations

Hey Rik,

On 02/08/2011, at 5:58 PM, Rik Cabanier wrote:

> It seems that non-contiguous properties could act like a toggle.
> Otherwise, you might have to do silly things like:
> 
> @keyframes four-seconds-long-animation {
>       from { display: block }
>       49.99% { display: block }
>       50%{ display: none }
>       to { display: none }
> }

You can do this:

@keyframes disappear-half-way {
  from { display: block; }
  50% { display: none; timing-function: step-end; }
  to { display: none; }
}

I wonder if steps() should add a "middle" to its current "start" and "end"? That would mean you wouldn't need the 50% keyframe.

Dean

Received on Wednesday, 3 August 2011 01:13:15 UTC