<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 150px;
background: #8ebf42;
position: relative;
animation: play 1s infinite;
div:hover {
animation-play-state: paused;
@keyframes play {
from {left: 0px;}
to {left: 200px;}
</style>
</head>
<body>
<p>Наведите курсор мыши на зеленый блок, чтобы приостановить анимацию.</p>
<div></div>
</body>
</html>