DIV在3秒后自动向右上角缩小并且消失

时间:2021-08-31 15:34:43

<html>
<head>
<style>
body{
 text-align:center;
}
.tab{
 width:422px;
 height:400px;
 margin:0 auto;
 overflow:hidden;
 border:1px solid #cccccc;
 position: relative;
 left:0px; top:0px
}
</style>
<head>
<body>
<script>
H=400;//'tab1'高
W=1002;//'tab1'宽
id='tab1'
function show_con(){
var obj_nav=document.getElementById(id)
var n=20,t=50;
var timers=new Array(n);
    for(var i=0;i<n;i++){(
     function(){
      if(timers[i]) clearTimeout(timers[i]);
      var j=i;
      timers[i]=setTimeout(function(){
       obj_nav.style.height=H-Math.round(H*(j+1)/n);
       obj_nav.style.width=W-Math.round(W*(j+1)/n);
       obj_nav.style.left=Math.round(W*(j+1)/n)/2;
       },(i+1)*t);
     }
    )()};
}
setTimeout("show_con()",5000)//if (FLASH播放完)show_con();
</script>
<div id='tab1' class='tab'>
 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="400" height="350">
    <param name="movie" value="http://www.badjohnny.net/zp/badjohnny_flash/index.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <param name="wmode" value="Opaque">
    <embed src="http://www.badjohnny.net/zp/badjohnny_flash/index.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-
shockwave-flash" width="800" height="600"></embed>
  </object>
</div>
</body>
</html></font>
<a href="http://js.alixixi.com/">欢迎访问阿里西西网页特效代码站,js.alixixi.com</a>