Pause css animation

寵の児 提交于 2021-01-27 07:49:26

问题


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/


回答1:


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



来源:https://stackoverflow.com/questions/28021299/pause-css-animation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!