CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html> <head> <style> div {position: absolute;} #container div { background-color: #ff0; border: 1px solid #333333; width: 100px; height: 100px; opacity: 0.5; } div#wrapper { opacity: 1; background-color: red; z-index: 1; animation: anim 5s infinite linear; } @keyframes anim { 50% {z-index: 5;} } </style> </head> <body> <h1>Animatable 'word-spacing' Property</h1> <hr> <p>Experience the changing z-index property.<p> <div id="container"> <div id="wrapper">Wrapper</div> <div style="top:20px;left:20px;z-index:1;">z-index 1</div> <div style="top:40px;left:40px;z-index:2;">z-index 2</div> <div style="top:60px;left:60px;z-index:3;">z-index 3</div> <div style="top:80px;left:80px;z-index:4;">z-index 4</div> </div> </body> </html>