Ver Mensaje Individual
  #6 (permalink)  
Antiguo 12/03/2009, 17:49
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: oscilamiento vertical

Así mejora:
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<style>
#unico{ margin-left:300px}
#unico div{ background-color:#F00; width:100px; height:20px; margin:5px 0; position:relative}
</style>
<script>
function posicionar(padre,ang){
	var deplmax=50;
	var hijos=padre.getElementsByTagName('div');
	var paso=2*Math.PI/hijos.length;
	for(var i=0,obj;obj=hijos[i];i++){
		obj.style.left=Math.sin(ang+(paso*i))*deplmax+'px';
	}
}
onload=function(){
	var i=0;
	setInterval(function(){posicionar(document.getElementById('unico'),i+=.1);},15);
}
</script>
</head>

<body>
<div id="unico">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
Por ese lado van los tiros ;)