Animations in HTML5 using CSS3
So, I got this code: <!doctype html> <html> <head> <title> Hello :) </title> <style> body{ background:blueviolet; margin:0px; } .wrapper{ width: 70%; height: 300px; background-color: red; } #a1{ width: 10%; height: 33.333%; background-color:blue; animation: a1-move 3s linear forwards; } @keyframes a1-fill{ 0%{} 50%{} 100%{width: 100%;} } @keyframes a1-move{ 0%{} 50%{} 100%{transform:translateX(100%);} } </style> </head> <body> <div class="wrapper"> <div id="a1"> </div> </div> </body> </html> When I apply "animation: a1-fill 3s linear forwards;" to "a1": it fills the whole "wrapper" class as expected. However, if I apply "animation: a1-move 3s linear forwards;" to "a1": the <div> container with id "a1" does not move till the end. What do I miss?