The animation-fill-mode specifies the style applied to an element when the animation has finished.
Final Code
<style>button{border-radius:5px;color:white;background-color:#0F5897;padding:5px10px8px10px;}button:hover{animation-name:background-color;animation-duration:500ms;/* Only change code below this line */animation-fill-mode:forwards;/* Only change code above this line */}@keyframesbackground-color{100%{background-color:#4791d0;}}</style><button>Register</button>