animation-fill-mode: both

The div gets the first keyframe styles before starting and retains the last keyframe styles after ending: