<html >
<head>
<style>
<!--
.intro{position:absolute;
left:0;
top:0;
layer-background-color:gray;
background-color:gray;
border:0.1px solid gray
}
-->
</style>
</head>
<body>
<div id="i1" class="intro"></div><div id="i2" class="intro"></div><div id="i3"
class="intro"></div><div id="i4" class="intro"></div><div id="i5" class="intro"></div><div
id="i6" class="intro"></div><div id="i7" class="intro"></div><div id="i8" class="intro"></div>
<SCRIPT language=javascript>
var speed=30;
var temp=new Array();
var temp2=new Array();
//判斷流覽器類型是否是IE
if (document.all)
{
var clipbottom=document.body.offsetHeight,cliptop=0;
//迴圈設置用來實現百葉效果的div
for (i=1;i<=8;i++)
{
temp[i]=eval("document.all.i"+i+".style")
temp[i].width=document.body.clientWidth/8
temp[i].height=document.body.offsetHeight
temp[i].left=(i-1)*parseInt(temp[i].width)
}
}
function openit()
{
window.scrollTo(0,0);
if (document.all)
{
clipbottom-=speed;
//使用clip實現div的裁減
for (i=1;i<=8;i=i+2){
temp[i].clip="rect(0 auto+"+clipbottom+" 0)"
}
cliptop+=speed
for (i=2;i<=8;i=i+2){
temp[i].clip="rect("+cliptop+" auto auto)"
}
if (clipbottom<=0)
clearInterval(stopit); //清空計時器
}
}
function gogo(){
stopit=setInterval("openit()",100);//設置計時器,迴圈
}
gogo(); //初始狀態便顯示百葉窗效果
</SCRIPT>
</body>
</html>
留言列表