Source Code:
(back to article)
Submit
Result:
Report an issue
<!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>Hover over the green box to stop the animation.</p> <div></div> </body> </html>