After dedicating two months to learning CSS, I encountered a challenge with animation. Despite setting my code to finish at lime, the animation completes and the div reverts back to red.
@keyframes example{
from{background-color: red}
to{background-color: lime}
}
.animate{
width:200px;
height:100px;
background-color: red;
animation-name: example;
animation-direction: alternate;
animation-duration: 4s;
animation-iteration-count: 1;
}