I am trying to make animation running on one picture inside dive when I hover another picture inside same div. And it doesn't work. Animation is running if I choose #div:hoover but not if I go with #picture:hover.
http://jsfiddle.net/tvmfjpbc/#&togetherjs=99g0GlPB33
#test {
position: relative;
width: auto;
height: 600px;
Background: lightblue;
margin: auto;
}
#cat {
position: absolute;
left: 150px;
top: 0;
animation-name: cat;
animation-duration: 2s;
animation-delay: 0s;
animation-play-state: paused;
}
#banana:hover #cat {
animation-play-state: running;
}
@keyframes cat {
0% {
left: 150px;
}
100% {
left: 250px;
}
}
<div id="test">
<img id="banana" src="https://i.imgur.com/D9TI3VT.jpg">
<img id="cat" src="https://i.imgur.com/j8gJnFq.jpg">
</div>