Re: Splitting background-position in two different attributes

On Aug 4, 2011, at 8:14 PM, Alan Gresley <alan@css-class.com> wrote:

> The below would be easier and would also allow 'background-position-x' to be animated independently or just declared outside the keyframe with a single value (background-position-x: 30%).
> 
> 
> @keyframe y-axis-downwards {
>  from { background-position-y: 0%; }
>  50%  { background-position-y: 50%; }
>  to   { background-position-y: 100%; }
> }

I was thinking of something like the following, that would be more cumbersome to attempt in other ways:

@keyframe y-downwards-x-rightwards {
 from { background-position-y: 0%; background-position-x: 0; }
 33% { background-position-x: 3.3em; }
 80% { background-position-x: 6.1em; }
 to   { background-position-y: 100%; }
}

Received on Friday, 5 August 2011 05:00:38 UTC