Here's one example of element code and the binded animation.
/* Animated elements */ #black { background-color: black; } #black:hover { /* Call the animation on hover */ animation-name:changecolor; animation-duration:4s; } @keyframes changecolor { from { background-color: black; } to { background-color: red; } }