+ 3
What is @keyframes in css??
3 odpowiedzi
+ 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;}
}
+ 8
some of Keyframes
https://code.sololearn.com/WKmH8CbQhMx9/?ref=app
+ 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.