CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html> <head> <style> #container { font-size: 20px; margin: auto; height:300px; position: relative; background: #333; box-shadow: 0 0 10px 0 #aaa; } #inset-container { position: absolute; display: flex; justify-content: center; height: 100%; inset-inline: 20px 50px; align-items: center; background-color:lightblue; animation: anim 5s infinite; } @keyframes anim { 50% {inset-inline: 50px 100px;} } </style> </head> <body> <h1>Animatable 'inset-inline' Property</h1> <hr> <p>Experience the changing inset-inline property.</p> <div id="container"> <div id="inset-container"> Container </div> </div> </body> </html>