Performance of CSS Transitions vs. JS animation packages

后端 未结 4 505
攒了一身酷
攒了一身酷 2020-11-28 05:31

I\'m wondering is there any difference in performance of using CSS Transitions vs. any of the various JavaScript animation libraries? (script.aculo.us, sc

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 06:27

    Yes, there is a difference, CSS is much faster. It may be difficult to see until you get many running at the same time or the more they do. CSS animations are limited though. In most cases they really only work off the :hover event. With JavaScript you can perform animations at any event: click, mouseover, mousemove, mouseout, keyup, keydown, etc.

    In my opinion, jQuery is the best for JavaScript animations in 2010. See jQuery Demos

提交回复
热议问题