0

I found some prewritten code and wonder what the difference is between -webkit-animation and animation. Both are used at the same place in a css file to animate some background. These articles about animation and -webkit-animation gave me some inside, but I could not find an answer. The code-snippet looks as follows:

  animation: slideright 600s infinite linear;
  -webkit-animation: slideright 600s infinite linear;

1 Answers1

0

The difference is that code using -webkit-animation is code witten before animation was standardised. Since animation has been widely supported for several years, you can now remove all references to -webkit-animation and just stick with animation.

The only exception would be if, looking at the two MDN pages you link, you decide that you wish to support very old Safari versions that handle -webkit-animation but not -animation.

Chris F Carroll
  • 11,146
  • 3
  • 53
  • 61