viernes, 5 de febrero de 2010

Create a simple popup with JavaScript and CSS

To create this popup effect you should have a back div (the black one) with the following style:

position:absolute
z-index:50
top:0
left:0
height:100%
width:100%
background-color:black
opacity:0.7


This layer has a z-index between the page and the popup (z-index = 50)

The popup is another div with the following style:

position:absolute
z-index:100
top:45%
left:45%

This panel is over the back layer (z-index = 100)


Click the following link to see the sample!
Open popup!

No hay comentarios:

Publicar un comentario