W3C home > Mailing lists > Public > www-style@w3.org > August 2011

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

From: Dean Jackson <dino@apple.com>
Date: Tue, 02 Aug 2011 18:12:40 -0700
Cc: Alan Gresley <alan@css-class.com>, Jonathan Snook <jonathan@snook.ca>, www-style@w3.org
Message-id: <EC40DD7A-1FB3-42B2-9425-E03BCC3CCE71@apple.com>
To: Rik Cabanier <cabanier@gmail.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT