Ver Mensaje Individual
  #5 (permalink)  
Antiguo 26/08/2013, 07:14
Avatar de nenu_racso90
nenu_racso90
 
Fecha de Ingreso: diciembre-2011
Ubicación: bilbao
Mensajes: 39
Antigüedad: 12 años, 4 meses
Puntos: 0
Respuesta: funcion incrementar left

Cita:
Iniciado por omarinfinito Ver Mensaje
prueba esto a ver si te sirve
Código HTML:
Ver original
  1. <script language="JavaScript">
  2. var contador=0;
  3. function incrementar() {
  4. if(contador < 50){
  5. document.getElementById("caja").style.left= contador++ + "px";
  6. }
  7. }
  8. setInterval(incrementar(), 1000);
  9.  
  10.  
  11. </script>
  12. <style type="text/css">
  13. #caja{position:absolute;
  14. left:0%;
  15. top:50%;
  16. width:50px;
  17. height:50px;
  18. background-color:red;
  19. }
  20.  
  21. </head>
  22. <div id="caja"></div>
  23. </body>
  24. </html>

nome funciona no se mueve cuando carga
__________________
_____________________________
___________DARK ELF__________
_____________________________