CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html> <head> <style> #outer { display: inline-block; background: #f00; box-shadow: 0 0 10px 0 #aaa; padding: 10px; min-width: 150px; animation: anim-outer 5s infinite; } #container { display: flex; justify-content: center; align-items: center; color: #fff; font-size: 20px; width: 100px; height: 30px; background: #333; box-shadow: 0 0 10px 0 #aaa; } @keyframes anim-outer { 50% {min-width: 300px;} } </style> </head> <body> <h1>Animatable 'min-width' Property</h1> <hr> <p>Experience the changing min-width of the outer Container.</p> <div id="outer"> <div id="container">Container</div> </div> </body> </html>