0

Where is technical difference between CSS Transition and CSS Animation?

Is animation (with keyframes) consists of several transitions?

Is keyframes support the only difference?

Are both of them are hardware accelerated?

Ruslan
  • 2,678
  • 3
  • 22
  • 25
  • Related post - [CSS: Animation vs. Transition](https://stackoverflow.com/q/20586143/465053) – RBT Jun 06 '21 at 13:02

2 Answers2

1

Are both of them are hardware accelerated?

-- Yes, both are hardware accelerated.

for other question answer you have to refer this site

https://cssanimation.rocks/transition-vs-animation/

Shantanu Sharma
  • 666
  • 6
  • 21
  • you link basically says "animation is more powerful than transition because of keyframes" my question was: "are there any other differences except of keyframes" – Ruslan Nov 25 '19 at 06:22
  • No, both are power full according browser and hardware accelerated, but in general i found some lag if we make complex animation using highly key frames... – Shantanu Sharma Nov 25 '19 at 06:28
1

Transition:

A transition is performed between two distinct states: A start state and an end state. Transitions also need a triggering event such as hover, focus and etc. Transitions are mostly used for simple animations.

Animation:

Unlike transitions, animations can be used for endless animations and have more than two states (@keyframes). They also have no boundaries.

Both use CPU acceleration for smoother effects.

Hasan Haghniya
  • 2,347
  • 4
  • 19
  • 29