Código:
Me gustaria que cuando llegase a 900px, se parara, pero se quedase ahí. <!DOCTYPE html> <html> <head> <style> div { width:100px; height:100px; background:red; position:relative; animation:myfirst 2s; -moz-animation:myfirst 2s; /* Firefox */ -webkit-animation:myfirst 2s; /* Safari and Chrome */ -o-animation:myfirst 2s; /* Opera */ } @keyframes myfirst { 0% {background:red; left:0px; top:0px;} 100% {background:yellow; left:0px; top:0px; width:900px;} } @-moz-keyframes myfirst /* Firefox */ { 0% {background:red; left:0px; top:0px;} 100% {background:yellow; left:0px; top:0px; width:900px;} } @-webkit-keyframes myfirst /* Safari and Chrome */ { 0% {background:red; left:0px; top:0px;} 100% {background:yellow; left:0px; top:0px; width:900px;} } @-o-keyframes myfirst /* Opera */ { 0% {background:red; left:0px; top:0px;} 100% {background:yellow; left:0px; top:0px; width:900px;} } </style> </head> <body> <div></div> </body> </html>