Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/01/2010, 09:11
SeaPirates
 
Fecha de Ingreso: enero-2009
Ubicación: España
Mensajes: 786
Antigüedad: 15 años, 3 meses
Puntos: 9
Respuesta: Ayuda :) Como agregar una ventana flotante??

Prueba con esto:


Código Javascript:
Ver original
  1. <style>
  2.         .black_overlay{
  3.             display: none;
  4.             position: absolute;
  5.             top: 0%;
  6.             left: 0%;
  7.             width: 100%;
  8.             height: 100%;
  9.             background-color: black;
  10.             z-index:1001;
  11.             -moz-opacity: 0.8;
  12.             opacity:.80;
  13.             filter: alpha(opacity=80);
  14.         }
  15.         .white_content {
  16.             display: none;
  17.             position: absolute;
  18.             top: 25%;
  19.             left: 25%;
  20.             width: 50%;
  21.             height: 50%;
  22.             padding: 16px;
  23.             border: 16px solid orange;
  24.             background-color: white;
  25.             z-index:1002;
  26.             overflow: auto;
  27.         }
  28.     </style>
  29.     </head>
  30.     <body>
  31.         <p>Para abrir click <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">aquí</a></p>
  32.  
  33.         <div id="light" class="white_content">Contenido del lightbox<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
  34.         <div id="fade" class="black_overlay"></div>
  35.     </body>
  36. </html>


Saludos,!