본문 바로가기

javascript

물거품이 생겼다 없어지는 멋진 화면


<!-- 스크립트-->

<style type="text/css">

a { text-decoration:none;}
a:hover { color:'black';background-color:'white';}

</style>

<script language='javascript'>
<!--

function network()//넷츠케이푸의 처리.
{
  var nansu,nansux,nansuy;
  
  for(var i=0; i<7; i++)
  {
    if(poks[i]==0)
    {
    nansux= Math.floor(Math.random()*(screen.availWidth-200))+20;
    nansuy= Math.floor(Math.random()*(screen.availHeight-300))+100;
    document.layers[i].left= nansux;
    document.layers[i].top= nansuy;
    }
  }

  for(var i=0; i<7; i++)
  {
   nansu= Math.floor(Math.random()*10);
   if(nansu==i)
   {
     document.layers[i].clip.right-= poks[i];
     document.layers[i].clip.bottom-= poks[i];
     poks[i]=0;
   }
   else
   {
    poks[i]+= 4;
    document.layers[i].clip.right+= 4;
    document.layers[i].clip.bottom+= 4;
   }
  }
  
  setTimeout('network()',110);
}

function mainwork()
{
  var nansu,nansux,nansuy;
  
  for(var i=0; i<ides.length; i++)
  {
    if(fonts[i]==0)
    {
    nansux= Math.floor(Math.random()*(screen.availWidth-200))+20;
    nansuy= Math.floor(Math.random()*(screen.availHeight-300))+70;
    ides[i].style.pixelLeft= nansux;
    ides[i].style.pixelTop= nansuy;
    }
  }
  
  nansu= Math.floor(Math.random()*11);
  for(var i=0; i<ides.length; i++)
  {
   if(nansu==i)
   { fonts[i]=0; ides[i].style.fontSize= fonts[i];}
   else
   { fonts[i]+=5;ides[i].style.fontSize=fonts[i];}
  }

  setTimeout('mainwork()',110);
}

//익스플로러인 경우에 대한 초기 처리
function iestart()
{
  for( var i=0; i<ides.length; i++)
  {
   ides[i]= eval('document.all.'+ides[i]);
  }

  mainwork();
}

ides= new Array(7);
function begin()
{
  if(navigator.appName=='Netscape')
  {
   poks= new Array(0,0,0,0,0,0,0);//변화폭 받기.
   network();
   return false;
  }
  fonts= new Array();

  for( var i=0; i<7; i++)
  {  ides[i]= 'id'+(i+1); fonts[i]=0;}

   iestart();
}

//-->
</script>
</head>

<body bgcolor="#114477" text=white link=white vlink=white onload="begin()">
  <layer id='ida' position=absolute width=0 height=0 bgColor='#ffaaaa'></layer>
  <layer id='idb' position=absolute width=0 height=0 bgColor="#aaffaa"></layer>
  <layer id='idc' position=absolute width=0 height=0 bgColor='#aaaaff'></layer>
  <layer id='idd' position=absolute width=0 height=0 bgColor='#ffffaa'></layer>
  <layer id='ide' position=absolute width=0 height=0 bgColor='#aaffff'></layer>
  <layer id='idf' position=absolute width=0 height=0 bgColor='#ffaaff'></layer>
  <layer id='idg' position=absolute width=0 height=0 bgColor='#ffffff'></layer>

  <p id='id1' style="position:absolute;visibility:hide;color:'#ffaaaa';font-size:10pt;">●</p>
  <p id='id2' style="position:absolute;visibility:hide;color:'#aaffaa';font-size:10pt;">●</p>
  <p id='id3' style="position:absolute;visibility:hide;color:'#aaaaff';font-size:10pt;">●</p>
  <p id='id4' style="position:absolute;visibility:hide;color:'#ffffaa';font-size:10pt;">●</p>
  <p id='id5' style="position:absolute;visibility:hide;color:'#aaffff';font-size:10pt;">●</p>
  <p id='id6' style="position:absolute;visibility:hide;color:'#ffaaff';font-size:10pt;">●</p>
  <p id='id7' style="position:absolute;visibility:hide;color:'#ffffff';font-size:10pt;">●</p>
 

211.230.112.24