jQuery - chart animation in theory
I'm planning to develop simple chart generator.
80% will be jQuery based - and I'm looking for some answers from more experienced jQuery users.
My animation will be based on:
- jQuery
- CSS
- Background images
Basically, can jQuery manipulate CSS that often to create animation efect?
For example: change background-position every couple of ms to create animation?
E.G. change background-position from 'top left' to 'top right', but on px by开发者_如何学运维 px based?
Have you ever seen this kind of usage?
Any examples, suggestion, technics examples much appreciated.
You can set the speed of an animation in jQuery.
I would recommend to clear the animation stack before each call.
jQuery does animation well: see the docs.
It can't animate everything though. If you need to do more advanced CSS animations, you'll need to use the effects that come with jQuery UI.
See:
http://www.protofunc.com/scripts/jquery/backgroundPosition/
See also:
http://sixrevisions.com/javascript/10-awesome-techniques-and-examples-of-animation-with-jquery/
which lists some background animation effects.
精彩评论