Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pause css animation

I made a slideshow in html and css and I want to pause the slideshow when my mouse goes over it. I tried to do this with -webkit-animation-play-state: paused;, but this only pauses 1 image and therefor messes up the slideshow. Is there a way to pause all the images on hover?

http://jsfiddle.net/m3q8pe56/

like image 331
maxmijn Avatar asked Feb 12 '23 03:02

maxmijn


1 Answers

http://jsfiddle.net/m3q8pe56/1/

#slideshow:hover .photo {
    -webkit-animation-play-state: paused; 
    animation-play-state: paused; 
}

When you hover #slideshow you will pause all .photo within #slideshow

like image 101
Nick Avatar answered Feb 14 '23 00:02

Nick