中文(繁体)
<!-- bbs http://www.downcodes.com/bbs--> <!-- 將以下程式碼加入<head>區域內 --> <xml:namespace ns="urn:schemas-microsoft-com :vml" prefix="v"/> <style> v:* { 行為: url(#default#VML); } </style> <!-- 將以下程式碼加入<body>區域內--> <SCRIPT> // 3D-Slideshow // 來自http://www.downcodes.com 的更多javascript var Slideurl=new Array( ) Slideurl[0]="/img/200406301.jpg" slipurl[1]="/img/200406302.jpg" slipurl[2]="/img/200406303.jpg" // 為每個圖片新增對應的連結 / / 如果您不想連結圖片,請輸入「#」 var sliplink=new Array() sliplink[0]="http://www.downcodes.com" sliplink[1]="http://www . downcodes.com" sliplink[2]="http://www.downcodes.com" // 為每個連結新增對應的目標// 可接受的值"_blank" 或"_top" 或"_parent" 或"_self " var SlideTarget=new Array() SlideTarget[0]="_Blank" SlideTarget[1]="_Self" SlideTarget[2]="_Top" // 設定 3D 邊框的寬度(像素) var backDepth=6 // 設定3D邊框的顏色(需要HTML 值) var fillcolor="#666666" // 設定影像的靜止時間(秒)(Netscape Navigator 需要) var Standstill=3 // 設定影像影格的形式// 可接受值為“oval”或「rect」 var imageform="oval" // 不要在此行下方編輯var slipwidth=1 var slipheight=1 var ns6=document.getElementById&&!document.all?1:0 var opera=navigator. userAgent.match(/ Opera/) var ie5=document.getElementById&&document.all&&!opera?1:0 靜止*=1000 var floatspeed=1 var tempo=20 var numberofimages=slideurl.length-1 var stepx=new Array(a umberofimages=slideurl.length-1 var stepx=new Array() stepy stepy=new ) for (i=0;i<=images;i++) { stepx[i]=randommakerNS(floatingspeed) stepy[i]=randommakerNS(floatingspeed) } var imgwidth=new Array() var imgheight=new Array() for (var imgwidth=new Array() var imgheight=new Array() for ( i=0;i<=images;i++) { imgwidth[i]=10 imgheight[i]=10 } var x,y var marginbottom var marginleft=0 var margintop=0 var marginright var 計時器var i_fadestrength =new Array( ) var i_fadestep=new Array() var i_fadenow=new Array() var i_fadenowmax=new Array() for (i=0;i<=slideurl.length;i++) { i_fadenowmax[i]=2 i_fadestrengthmaker i]=randommakerth[ i] (99) i_fadestep[i]=1 i_fadenow[i]=0 } var spancontent=new Array() var i_spancontent=0 var imgpreload=new Array() for (i=0;i<=slideurl.length ;i++) { imgpreload[i]=new Image() imgpreload[i].src=slideurl[i] } for (i=0;i<=images;i++) { spancontent[i]="<a href=' "+slidelink[ i]+"' target='"+slidetarget[i]+"'><img src='"+slideurl[i]+"' border='0'></a>" } var i_angle1 =0 var i_size =1 var i_pic=0 var posleft=0 var postop=0 var x_extrusionangle=0 var y_extrusionangle=0 var x_rotationcenter=0 var y_rotationcenter=0 var pagewidth var pageheight function initbotight 1. innerWidth-11 var thisspan=document.getElementById('span0') thisspan.innerHTML=spancontent[0] var thisspan=document.getElementById('span0') imgwidth[0]=parseInt(thisspan.setWidth) (thisspan.offsetHeight) var maxleftstart=marginright-imgwidth[0] var maxtopstart=marginbottom-imgheight[0] var thisspan=document.getElementById('span0').style thisspan。 ) thisspan.top=parseInt(thisspan.top)+randommakerNS(maxtopstart) thisspan.visibility="visible" checkmovementNS() } function randommakerNS(range) { rand=Math.floor(range*Math.random() ) if (rand ==0) {rand=Math.ceil(range/2)} return rand } function checkmovementNS() { checkpositionNS() movepicturesNS() timer=setTimeout("checkmovementNS()",tempo) } function movepicturesNS( ) { var thissNS( ) =document.getElementById('span0').style thisspan.left=parseInt(thisspan.left)+stepx[0] thisspan.top=parseInt(thisspan.top)+stepy[0] i_fadenow[0]+ + if (i_fadenow [0]>=i_fadenowmax[0]) { i_fadenow[0]=0 if (i_fadestrength[0]>=100) {i_fadestep[0]=i_fadestep[0]*-1} else if (i_fadestrength[ 0]<= 0) { i_fadestep[0]=i_fadestep[0]*-1 i_spancontent++ if (i_spancontent>=spancontent.length) {i_spancontent=0} document.getElementById('span0').innerHTML=scontentcontentcontent[i_scontent] ]+=i_fadestep[0] document.getElementById('span0').style.MozOpacity=Math.round(i_fadestrength[0])/100 } function checkpositionNS() { imgwidth[0]=parseInt(docBument. ElementElementat ').offsetWidth) imgheight[0]=parseInt(document.getElementById('span0').offsetHeight) var thisspan=document.getElementById('span0').style var leftx=parseInt(thisspan.leftIntse) var topypan. thisspan.top) if (leftx>marginright-imgwidth[0]-floatingspeed) { thisspan.left=leftx-Math.abs(stepx[0]+1) stepx[0]=randommakerNS(floatingspeed)*- 1 } if ( leftx<marginleft) { thisspan.left=leftx+Math.abs(stepx[0]) stepx[0]=randommakerNS(floatingspeed) } if (topy>marginbottom-imgheight[0]-floatingspeed) { thisspan. Math.abs(stepy[0]) stepy[0]=randommakerNS(floatingspeed)*-1 } if (topy<margintop) { thisspan.top=topy+Math.abs(stepy[0]) stepy[ 0]=randommakerNS (floatingspeed) } } function initIE() { var i_preload=0 for (i=0;i<=slideurl.length-1;i++) { var imgref=eval("document.n"+i) if (imgref.complete ) {i_preload++} } if (i_preload>=slideurl.length-1) { slipwidth=document.getElementById('spn1').offsetWidth slipheight=document.getElementById('spn1').offsetWidth slipheight=document.getElementById('spn1').offsetHeight pagewidth.docm. document.身體。 2 x_rotationcenter=(posleft/slidewidth)/2 y_rotationcenter=(postop/slideheight)/2 varrotationcenter=0+","+y_rotationcenter+","+x_rotationcenter document.getElementById('rtationcenter+","+x_rotationcenter document.getElementById('rtationcenter+","+x_rotationcenter document.getElementById('rtationcenter+)。style. ('rectid').style.top=posto document.getElementById('extrusionid').rotationcenter=旋轉中心rotateIE() } else { var timeout=setTimeout("initIE()",200) } } function rotateIE() { i_angle1+=1 if (i_angle1>=360) { i_angle1=0 } if (i_angle1==127) { i_pic++ if (i_pic>=slideurl.length) {i_pic=0} document.getElementById('urlsrcide) . [i_pic] } document.getElementById('rectid').style.rotation=i_angle1 document.getElementById('extrusionid').rotationangle=i_angle1+","+i_angle1 var timeout=setTimeout("rotateIETimeout("rotateIE)",unc. openpageIE() { if (slidetarget[i_pic]=="_blank") { window.open(slidelink[i_pic]) } else if (slidetarget[i_pic]=="_self") { document.location.href (slidelink[i_pic]=="_self") { document.location.href (slidelink[i_pic ]) } else if (slidetarget[i_pic]=="_top" || Slidetarget[i_pic]=="_parent") { top.location.href(slidelink[i_pic]) } } if (ns6) { document.write("<span id='span0' style='position:absolute;top: 0px;left:0px;filter:alpha(opacity=0);-moz-opacity:0'></span>") document.close() window.onload=initNS } if (ie5) { document.write(' <div id="preloadimages" style="position:absolute;left:0px;top:-5px;visibility:hidden">') for (i=0;i<=slideurl.length-1;i++) { document. write('<span id="spn'+i+'" style="position:absolute;width:2px;left:0px;top:0px;">') document.write('<img src="'+slideurl [i]+'" name="n'+i+'">') document.write('</span>') } document.write('</div>') document.write('<v:' +imageform+' id="rectid" style="position:absolute;top:0;left:0;width:'+slidewidth+';height:'+slideheight+'" onClick="openpageIE()">') document.write ('<v:extrusion id="extrusionid" on="true" type="perspective" color="'+fillcolor+'" 旋轉中心="0,0,0" back深度="'+back深度+'" diffusity="2.5 “metal =“true”>')document.write('</v:extrusion>')document.write('<v:fill id =“fillid”opacity =“100%”color =“' + fillcolor +'” type="frame" src="'+slideurl[0]+'"/>') document.write('</v:'+imageform+'>') window.onload=initIE } </ script>