1

This is a very general question, so I have not provided a code.
I was trying out various CSS animations yesterday, however, I was unable to control any of them using the :hover pseudo element in CSS. I basically wan't to slow the animation when a user brings his/her mouse onto the division.

Pure CSS solution will be appreciated. :) thanks in advance.

Harshal Gajjar
  • 265
  • 1
  • 4
  • 12

1 Answers1

1

There is no "comon way" to do this. You will need to find some workarounds.

The most common workaround to slow a CSS animation down on hover is to apply the same animation on the element and it's parent and pause one on hover with the animation-play-state: paused;. (or the other way around with animation-play-state: running;)

EXAMPLE (comes from this answer : Change the Animation speed on hover)

As you can imagin this can't work for all animations and you will need to be creative in each situation to find a solution for this.

Community
  • 1
  • 1
web-tiki
  • 99,765
  • 32
  • 217
  • 249