Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/02/2014, 19:29
Avatar de djaevi
djaevi
 
Fecha de Ingreso: marzo-2007
Ubicación: Moreno, Buenos Aires
Mensajes: 400
Antigüedad: 17 años, 11 meses
Puntos: 47
Respuesta: mostrar capa oculta con efecto cortina vertical

Algo asi te sirve? Pegalo en un html vacio y proba si es lo que te sirve:

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title> Cortina </title>
  5.  
  6.  
  7.     #container {
  8.        
  9.         position:absolute;
  10.         top:100px;
  11.         left:300px;
  12.         width:500px;
  13.         height:350px;
  14.         border:dashed black 1px;
  15.        
  16.     }
  17.    
  18.     #capa {    
  19.         position:absolute;
  20.         width:100%;
  21.         height:100%;
  22.         background-color:red;  
  23.         z-index:0;
  24.     }
  25.    
  26.     #cortina {
  27.         position:absolute;     
  28.         width:100%;
  29.         height:100%;
  30.         background-color:blue; 
  31.         z-index:1;
  32.     }
  33.  
  34.  
  35. <script type="text/javascript">
  36.    
  37.     function abrir() {
  38.    
  39.         if (step > 0) {
  40.        
  41.             step += step_size;
  42.            
  43.             cortina.style.height = step + "%";
  44.            
  45.             cron = setTimeout('abrir()',100);
  46.            
  47.         }else{
  48.        
  49.             clearTimeout(cron);
  50.            
  51.         }
  52.            
  53.     }
  54.    
  55.     function init() {
  56.  
  57.         cron = null;
  58.    
  59.         step = 100;
  60.    
  61.         step_size = -5;
  62.        
  63.         cortina = document.getElementById("cortina");
  64.        
  65.     }
  66.  
  67.  
  68. </head>
  69.  
  70. <body onload="init();">
  71.  
  72.     <div id="container">
  73.    
  74.         <div id="capa"></div>
  75.         <div id="cortina"></div>
  76.    
  77.     </div>
  78.    
  79.     <input type="button" onclick="abrir();" value="abrir" />
  80.  
  81. </body>
  82. </html>

Saludos!