.div1 { width:200px; height:200px; overflow:hidden; margin:auto; position:relative; } @keyframes anis { 100% { transform:translateY(-200px) } }img { position:absolute; } .div2 { animation:anis 10s linear infinite; } .div2:hover { animation-play-state:paused; }