Is there a way to animate an HTML element by using a variable with keyframes, but without directly manipulating the DOM?
Below is the HTML code:
<div class="pawn" id="pawn1"></div>
Here is the CSS keyframes code:
@keyframes mov_pawn_up {
0% {
bottom: 0%;
}
100% {
bottom: 700%;
}
}
I am looking for a solution that allows me to customize the bottom
property using a variable.
Any advice or suggestions would be greatly appreciated. Thank you!