Answers for "how to stop animation after the hover"

CSS
1

css animation stop

//Animation can be played or paused with the below css property.
.class / tag / #id {
animation-play-state: 'paused' / 'running';
}
Posted by: Guest on July-23-2021
0

animation not hover out

/* Add animation to normal selector as well, besides hover selector */
div {
  background-color: #333;
  transition: background-color 400ms;
} 

div:hover {
  background-color: #000;
  transition: background-color 400ms;
}
Posted by: Guest on January-08-2022

Browse Popular Code Answers by Language