On Thu, Aug 29, 2013 at 2:56 AM, Kuzeko Web Design - Matteo Lissandrini < [email protected]> wrote:
> I am trying a simple animation: long text inside a box scrolling up. > Since I have multiple boxes they have different length, so I am trying to > use keyframe animation with top positioning with percent value. > > Please find an example here: > http://jsfiddle.net/sKEnv/1/ > > As you can see the first example is using em units and it works, the second > it uses percent values and it doesn't. > > Am I doing something wrong or is simply not possible to do this with > percent values? > Your second example doesn't work because there is no context from which to calculate percentages (i.e. -120% of what?) . If you add a height to your container (.wrapper2) then the animation works as expected because it now has a context (height) from which to calculate the percentage. -- Jon Reece [email protected] ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
