CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html> <head> <style> #container { position: relative; margin: auto; height: 150px; width: 300px; padding: 10px; background: #333; text-align: center; color: #fff; box-shadow: 0 0 10px 0 #888; } @keyframes anim { 25% {transform: rotateY(180deg);} 50% {transform: rotateX(180deg);} 75% {transform: rotateX(360deg);} 100% {transform: rotateY(360deg);} } #child { padding: 50px; margin: 10px auto; background-color: red; border-radius: 10px; white-space: pre; animation: anim 10s infinite; font-size: 20px; } </style> </head> <body> <h1>Animatable 'transform' Property</h1> <hr> <p>Experience the changing value of the transform rotate property.<p> <div id="container">Transform Property <div id="child">0 1 2 3 4 5 6 7 8 9</div> </div> </body> </html>