Algo asi te sirve? Pegalo en un html vacio y proba si es lo que te sirve:
Código HTML:
Ver original<!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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
#container {
position:absolute;
top:100px;
left:300px;
width:500px;
height:350px;
border:dashed black 1px;
}
#capa {
position:absolute;
width:100%;
height:100%;
background-color:red;
z-index:0;
}
#cortina {
position:absolute;
width:100%;
height:100%;
background-color:blue;
z-index:1;
}
<script type="text/javascript">
function abrir() {
if (step > 0) {
step += step_size;
cortina.style.height = step + "%";
cron = setTimeout('abrir()',100);
}else{
clearTimeout(cron);
}
}
function init() {
cron = null;
step = 100;
step_size = -5;
cortina = document.getElementById("cortina");
}
<input type="button" onclick="abrir();" value="abrir" />
Saludos!