Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/03/2013, 02:56
royalz
 
Fecha de Ingreso: enero-2013
Ubicación: Zaragoza
Mensajes: 24
Antigüedad: 11 años, 3 meses
Puntos: 0
Animacion CSS

Como puedo hacer que esta animacion se pare en un punto:

Código:
<!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>
Me gustaria que cuando llegase a 900px, se parara, pero se quedase ahí.