We will be using the keyframes
function from styled-components to animate the position and rotation of an h1
.
Like styling using the global variable, we set the keyframes
keyword to a variable and inside of the backticks, we set what we want our element
to do. Then in a custom element
, we set animation
to our custom keyframes
variable.