Русский
<!-- веб-сайт:http://www.downcodes.com --> <!-- bbs:http://bbs.downcodes.com --> <!-- Полный HTML-код выглядит следующим образом --> <html > <head> <title>Эффект отображения изображения, аналогичный эффекту Flash</title> <meta name="Author" content="http://www.downcodes.com"> <meta http-equiv= «imagetoolbar» content = «no»> <style type = «text/css»> body {cursor: Crosshair; Margin: 0; Position: Absolute; Overflow: Hidden; Left: 0; верх:0 ; ширина:100%; высота:100%;zIndex:-2;} </style> <script type="text/javascript"><!-- // ========== === ====================================== // http://www. downcodes.com // Версия DOM: 2005.4 // ===================================== ===== ========== window.onerror = new Function("return true"); screen.bufferDepth = 16; document.onselectstart = function () { return false } //// ///// ////////////////// вар NX = 3; вар NY = 3; вар SP = 20; вар DELAY = 96; ////// //////////////// var object = new Array(); var nI = 0; var run = false; var xrun = 0; 1; вар iW = 0; вар iH = 0; вар oW = 0; функция CObj(N,y,x){ this.obj = document.createElement("span"); = новая функция("объект[ "+N+".GE1()"); this.obj.onmousedown = новая функция("return false;"); this.obj.style.cursor = "pointer"; .style.position = "абсолютный"; this.img = document.createElement("img"); this.img.style.position = "absolute"; this.img.src = IMGSRC[N%nI].src; .obj.appendChild(this.img); IMGBOX.appendChild(this.obj); this.object = new Array(); this.y = y; this.W = 0; this.H = 0; this.L = 0; this.T = 0; функция CImg(Parent,y,x){ this.Parent = Parent; this.createElement("span"); .obj.style.position= "absolute"; this.obj.style.overflow="hidden"; this.obj.style.cursor = "pointer"; this.img = document.createElement("img"); img.style.position = "абсолютный"; this.img.src = IMGSRC[N%nI].src; this.obj.appendChild(this.img); this.Parent.obj.appendChild(this.obj); .N = Родитель.N; this.x = x; this.W = 0; this.L = 0; this.dx = 0; .dy = 0; this.py = 0; this.dh = 0; this.ipx = 0; = 0; this.idx = 0; this.GE2 = function (){ with(this){ px -= dx * dR; py -= dy * dR; += dh * dR; ipx -= idx * dR; ipy -= idy * dR; with(obj.style) { left = Math.round(px); top = Math.round(py); (pw)+1; высота = Math.round(ph)+1; if(dR==-1)if(pw<=W+1)obj.style.visibility="hidden" } with(img.style ) { left = Math.round (ipx-oW); top = Math.round(ipy-oH } if(++xrun>=NX*NY*SP){ xrun=0; run=false; ==-1)Parent.obj.style.zIndex = 0; dR = -dR; } } } this.GE1 = function (N1,N2){ with(this){ if(dR==1){ px = L py = T;dx = ((Родитель.L + L) - (x * Родитель.W)) / SP dy = ((Родитель.T + T) - (y * Родитель.H)) / SP; = W; dw = (Родитель.W - W) / SP; dh = (Родитель.H - H) / SP; ipy = -T; ((x * Parent.W); ) - L) / SP; idy = ((y * Parent.H) - T) / SP } obj.style.visibility="visible"; if(img.height>document.body.offsetHeight)oH=(img; .height-document.body. offsetHeight)/2; else oH = 0; if(img.width>document.body.offsetWidth/2)oW=(img.width-(document.body.offsetWidth/2))/2 ; else oW = 0; for (i=0;i<SP;i++) setTimeout("object["+N1+"].object["+N2+".GE2()",16*i } это); .DOOT = функция (){ with(this){ W = Parent.W / NX; H = Parent.H / NY; L = x * W; T = y * H; var k = 0; var i=0;i< NY;i++) for(var j=0;j<NX;j++) this.object[k++] = new CImg(this,i,j); this.GE1 = function (){ with (this){ if(! run){ TXTBOX.innerHTML = "<div style='margin:2%'>"+TXTSRC[N%nI].innerHTML+"</div>"; run = obj.style; .zIndex = 1; for( var i=0;i<NX*NY;i++) setTimeout("object["+N+"].object["+i+"].GE1("+N+","+i+" )",i*DELAY) ; } } } this.DOOT = function (){ with(this){ if(img.width<iW)iW=img.width; if(img.height<iH)iH=img. высота; с (obj.style) { W = ширина = iW / NX; H = высота = iH / NY; L = слева = x * W; T = сверху = y * H; = W; высота = H; } for(var i in object) object[i].DOOT(); onload = function() {IMGSRC = document.getElementById("imgsrc").getElementsByTagName("img") TXTSRC = document.getElementById("txtsrc").getElementsByTagName("div"); IMGBOX = document.getElementById("imgbox"); TXTBOX = document.getElementById("txtbox"); ); iH = document.body .offsetHeight; iW = document.body.offsetWidth/2; nI = IMGSRC.length; for(var i=0;i<NY;i++){ for(var j= 0;j<NX;j++ ){ object[k] = new CObj(k,i,j); object[k++].DOOT(); } } IMGBOX.style.width = iW; IMGBOX.style.height = iH; TXTBOX.style.width = iW; TXTBOX.style.height = iH; TXTBOX.style.visibility = «visible»; CENTER.style.top = -iH/2; } / /--> </script> </head> <body> <div style="position:absolute;left:50%;top:50%;"><div id="center" style="position:absolute; "> <div id="imgbox" style="position:absolute;left:0;top:0;overflow:hidden;"></div> <div id="txtbox" style= "позиция: абсолютная; видимость: скрыто; переполнение: скрыто; фон: # 333; цвет: # FFF; семейство шрифтов: verdana; размер шрифта: 0,8em;"> <div style="margin:2%"> < h2>IMGBOX</h2> Нажмите на миниатюры слева, чтобы увеличить изображение. Здесь отображается описание, связанное с выбранным изображением.<br> <br>Примечание. Из соображений производительности размеры изображений не изменяются и должны быть целиком. того же размера </div > </div> </div></div> <div id="imgsrc" style="visibility:hidden"> <img src=""> <img src=""> <. img src=""> < img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> </ div> <div id=" txtsrc" style="visibility:hidden"> <div> <h2>река</h2><br>Просыпаюсь от сна у реки </div> <div> <h2>прозрачность </h2><br> Его прозрачность гипнотизировала </div> <div> <h2>холод</h2><br>Потоки холодной воды играли светом </div> <div> <h2>опускались внутрь. </h2><br>Я бросил несколько орехов в реку. Они какое-то время плавали, а затем утонули. </div> <div> <h2>маскировано</h2><br>Широкая ступенька скрывала воду. глубина воды. </div> <div> <h2>взгляд</h2><br>Позже я увидел русло реки, </div> <div> <h2>забытое</h2><. br>Инвалидная коляска зашумела. Я снова забыл о своих ногах </div> <div> <h2>поплыл</h2><br>Тем не менее, я плыл в забвении о слишком реальных вещах. <div> <h2>для меня</h2><br>Я пристально смотрел на раскрытые объятия воды. Ручей пел для меня. .dhteumeuleu.com – февраль 2005 г. --> <span id=LB0 style="position:absolute;left:50%;top:50%;"><span style="position:absolute;font-family:arial;font -size:10px;цвет: #FFFFFF;слева:-50;сверху:-18">Загрузка...</span> <span style="position:absolute;left:-50;top:-5;font- размер:1px;ширина:100 ;высота:10px;фон:#333"><span id=LB1 style="position:absolute;left:0;top:0;font-size:1px;width:0;height: 10px;background:#FFFFFF" ></span></span></span> <script>m00=document.getElementById("imgsrc").getElementsByTagName("img");m01=m00.length;function images_loading_bar( ){m02=0;for (i=0;i<m01;i++)m02+=(m00[i].complete)?1:0;document.getElementById("LB1").style.width=Math.round( m02/m01*100); if(m02==m01)setTimeout("document.getElementById('LB0').style.display='none'",128); else setTimeout("images_loading_bar()", 64); };images_loading_bar();</script> <!-- конец кода images_loading_bar --> </body> </html>