Version compl�te: jsB@nk » Image » Image Pieces
URL: https://www.javascriptbank.com/image-pieces.html
Cet JavaScript rend image apparaissent par la combinaison de nombreuses partie de concert.
Version compl�te: jsB@nk » Image » Image Pieces
URL: https://www.javascriptbank.com/image-pieces.html
<SCRIPT><!-- Beginning of JavaScript -// chieu rong cua anh (pixels)var imgwidth=502// chieu cao cua anh (pixels)var imgheight=273// dia chi cua anhvar imgurl="logojs.gif"// vi tri xuat hien anhvar x_finalpos=5var y_finalpos=5// so luong manh duoc cat ra tu anhvar imgslices=20// toc do di chuyen cua tung anhvar step=50var pause=20// dung chinh sua nhung bien sauvar marginrightvar width_slice=Math.floor(imgwidth/imgslices)var cliptop=0var clipbottom=imgheightvar clipleft=0var clipright=width_slicevar spannummer=0var spannrbefore=0function initiate() {if (document.all) {moveslices_IE()}}function moveslices_IE() {var thisspan=eval("document.all.span"+spannummer+".style")if (thisspan.posLeft>x_finalpos-width_slice) {thisspan.posLeft-=stepvar timer=setTimeout("moveslices_IE()",pause)}else if (spannummer<imgslices-1) {clearTimeout(timer)thisspan.posLeft=x_finalposspannummer++var timer=setTimeout("moveslices_IE()",pause)}else {thisspan.posLeft=x_finalposclearTimeout(timer)}}// - End of JavaScript - --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<BODY onload=initiate()><SCRIPT><!-- Beginning of JavaScript -for (i=0;i<=imgslices-1;i++) {marginright=screen.width+50 document.write("<span id='span"+i+"' style='position:absolute;visibility:visible; left:"+ marginright+"px;top:"+y_finalpos+"px;clip:rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+ clipleft+"px)'>")document.write("<img src='"+imgurl+"'>") document.write("</span>")clipleft+=width_sliceclipright+=width_slice}// - End of JavaScript - --></SCRIPT></body><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->