webmaster
Добавить в "Избранное"
Главная
Сборка нескольких картинок
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <title>Разборка</title> <script language="JavaScript"> var layerRef="null", styleSwitch="null"; function init(){ if (navigator.appName == "Netscape") { layerRef="document.layers"; styleSwitch=""; }else{ layerRef="document.all"; styleSwitch=".style"; } / функция обеспечивающая работу скрипта в IE и NN/ { var bro=navigator.appName; var ver=parseInt(navigator.appVersion); if( ver>=4) { arImgSrc = new Array ( "images/logo2r.gif", "images/logo2d.gif", "images/logo2u.gif", "images/logo2l.gif" ); arImgLst = new Array (); for (i in arImgSrc) { arImgLst[i] = new Image (); } /загрузка вектора картинок, входящих в слои / s=screen; g=100; n=s.height; df=n/2; ku=df-df%10; /обеспечение совпадение шага и прихода слоев к заданной точке встречи. / topstop=s.height/2-g; currUp=s.height-167; currD=-66; currL=-50; currR=s.height+50; } } function moveLayerUp(layerName){ if (currUp > ((s.height)/2+34-g)){ currUp-=5; } eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top= currUp'); setTimeout('moveLayerUp("'+layerName+'",'+currUp+','+topstop+')',0); } function moveLayerD(layerName){ if (currD < ((s.height)/2-33-g)){ currD+=5; } eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top= currD'); setTimeout('moveLayerD("'+layerName+'",'+currD+','+topstop+')',0); } function moveLayerL(layerName){ if (currL < (ku)){ currL+=10; } eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left= currL'); setTimeout('moveLayerL("'+layerName+'",'+currL+','+topstop+')',1); } function moveLayerR(layerName){ if (currR > (ku)){ currR-=10; } eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left= currR'); setTimeout('moveLayerR("'+layerName+'",'+currR+','+topstop+')',1); } document.write('<style type="text/css">') document.write('#d {POSITION: absolute; TOP:'+(s.height/2+34-g)+ '; LEFT:'+ku+'; Z-INDEX: 84000; WIDTH: 100px; HEIGHT: 100px;}') document.write('#l {POSITION: absolute; TOP:'+ (s.height/2-33-g)+ '; LEFT:'+ku+'; Z-INDEX: 84000; WIDTH: 100px; HEIGHT: 100px;}') document.write('#r {POSITION: absolute; TOP:'+ (s.height/2-33-g)+ '; LEFT:'+ku+'; Z-INDEX: 84000; WIDTH: 100px; HEIGHT: 100px;}') document.write('#u {POSITION: absolute; TOP:'+ (s.height/2-33-g)+ '; LEFT:'+ku+'; Z-INDEX: 84000; WIDTH: 100px; HEIGHT: 100px;}') document.write('</style>') </script> </head> <body onload="init();moveLayerUp('d'); moveLayerD('u'); moveLayerL('l');moveLayerR('r');" text="#000000" bgcolor="#FFFFFF"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="25%"><div id="d"> <dd><img src="images/logo2d.gif" WIDTH="100" HEIGHT="34"></dd> </div></td> <td width="25%"><div id="l"> <dd><img src="images/logo2l.gif" WIDTH="100" HEIGHT="66"></dd> </div></td> <td width="25%"><div id="r"> <dd><img src="images/logo2r.gif" WIDTH="100" HEIGHT="66"></dd> </div></td> <td width="25%"><div id="u"> <dd><img src="images/logo2u.gif" WIDTH="100" HEIGHT="66"></dd> </div></td> </tr> </table> </body> </html>
© 2000
Текущие результаты