animation name css code example
Example 1: create a animation name in css
p {
animation-duration: 3s;
animation-name: slidein;
}
@keyframes slidein {
from {
margin-left: 100%;
width: 300%;
}
to {
margin-left: 0%;
width: 100%;
}
}
Example 2: css move animation
article {
animation-name : displaceContent;
animation-duration : 1s;
animation-delay : 4s;
animation-iteration-count : 1;
animation-fill-mode : forwards;
}
@keyframes displaceContent {
from { transform : translateY(0em) }
to { transform : translateY(3em) }
}