Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background: #ccc; position: relative; animation: myfirst 5s 1; animation-direction: reverse; } @keyframes myfirst { 0% {background: #8DC3CF; left: 0px; top: 0px;} 25% {background: #1c87c9; left: 200px; top: 0px;} 50% {background: #030E10; left: 200px; top: 200px;} 75% {background: #666; left: 0px; top: 200px;} 100% {background: #8ebf42; left: 0px; top: 0px;} } </style> </head> <body> <h2>Beispiel für animation-direction</h2> <p>In diesem Beispiel spielt die Animation als Rückwärtsgang ab.</p> <div></div> </body> </html>