+ 3

What is @keyframes in css??

2nd Jul 2017, 10:16 AM
Amit Raghuwanshi
Amit Raghuwanshi - avatar
3 ответов
+ 20
According to https://www.sololearn.com/Course/CSS/?ref=app When you specify CSS styles inside the @keyframes rule, the animation will gradually change from the current style to the new style at certain times. To get an animation to work, you must bind the animation to an element. The CSS : @keyframes example {     0%  {background-color: red;}     50%  {background-color: yellow;}     70%  {background-color: blue;}     100% {background-color: green;}  }
2nd Jul 2017, 10:25 AM
Dev
Dev - avatar
4th May 2018, 6:22 AM
Nagarajk
Nagarajk - avatar
+ 3
This is the simplest example: body { animation: chgbg 1s 0s linear infinite; } @keyframes chgbg { from {background: red;} to {background: blue} } // keyframes creates animation sequences for body tag to change background from red to blue.
2nd Jul 2017, 11:51 AM
Calviղ
Calviղ - avatar