語法展示:: http://home.graffiti.net/pbghjjhg/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<body>及</body>標籤之間。
<script language="Javascript">
<!--
function init(){
tT="紫蓮の翼 http://blog.pixnet.net/como0925";
sT="紫蓮の翼 http://blog.pixnet.net/como0925";
tF="細明體";"Verdana,Georgia";
sF="細明體";"Verdana,Georgia";
tS=20;
sS=20;
tC="#FF0000";
sC="#3F3F3F";
ea=-8;
mPLS=true;
xan=-0.5;
yan=-0.5;
iT=1;
ie4=document.all?1:0;
ns4=document.layers?1:0;
ns5=(document.getElementById && !document.all)?1:0;
str='';
if (ns5) str+='<div id=gek0 style="position:absolute; z-index:1">';
for(i=1;i<(sS*1.2);i+=iT){
str+='<div id=sha'+i+' style="position:absolute;';
str+='left:'+Math.round(xan*(i+ea)+sS)+'px;';
str+='top:'+Math.round(yan*(i+ea)+i+ea)+'px;';
str+='font-family:'+sF+';font-size:'+sS+'px;color:'+sC+';';
str+='clip:rect('+((sS*1.2)-i)+',800,'+((sS*1.2)-i+iT)+',0)">'+sT+'</div>';
}
if (ns5)
str+='</div><div id=gek1 style="position:absolute;z-index:1"></div>';
str+='<div id=text style="position:absolute;left:'+(sS)+';font-size:'+tS;
str+='px;color:'+tC+';font-family:'+tF+';z-index:2">'+tT+'</div>';
if (ns4) document.main.document.write(str);
if (ie4) document.all.main.innerHTML=str;
if (ns5) document.getElementById("main").innerHTML=str;
if (mPLS){
tog=1;
inc=(iT<3)? 3:iT;
n=new Array(sS*1.2);
for(i=1;i<(sS*1.2);i++){
if (ns5) n[i]=document.getElementById("sha"+i);
if (ie4) n[i]=document.all["sha"+i];
if (ns4) n[i]=document.main.document.layers["sha"+i];
}
sw=(ie4)? document.body.offsetWidth-28:window.innerWidth;
sh=(ie4)? document.body.offsetHeight-20:window.innerHeight;
csw = Math.round(sw/2);
csh = Math.round(sh/2);
if (ns4||ns5){window.captureEvents(Event.MOUSEMOVE); window.onmousemove=mm;}
document.onmousemove=mm;
Ti=setInterval("caSt()",50);
}
}
function mm(e){
if (ns5){
xan=-((e.clientX)-csw)/csw;
yan=-((e.clientY)-csh)/csh;
}
else{
xan=-(((ns4)?e.pageX:event.x)-csw)/csw;
yan=-(((ns4)?e.pageY:event.y)-csh)/csh;
}
}
function caSt(){
if (ns5){ str='';
for(i=1;i<(sS*1.2);i+=inc){
xP=Math.round(xan*(i+ea)+sS);
yP=Math.round(yan*(i+ea)+i+ea);
str+='<div style="position:absolute;left:'+xP+'px;top:'+yP+'px;';
str+='font-family:'+sF+';font-size:'+sS+'px;color:'+sC+';';
str+='clip:rect('+((sS*1.2)-i)+'px,800px,'+((sS*1.2)-i+inc)+'px,0px)">'+sT+'</div>';
}
document.getElementById("gek"+tog).innerHTML=str;
tog=(tog)?0:1;
}else{
for(i=1;i<(sS*1.2);i+=iT){
xP=Math.round(xan*(i+ea)+sS);
yP=Math.round(yan*(i+ea)+i+ea);
if (ie4){
n[i].style.left=xP+"px";
n[i].style.top=yP+"px";}
if (ns4) n[i].moveTo(xP,yP);
}
}
}
-->
</script>
<div id="main" style="position: absolute; width: 100; height: 100; left: 190; top: 190"></div>
將以下程式碼複製,貼在<body >標籤裡面。
onLoad="init()" onUnload="if(Ti)clearInterval(Ti)"
留言列表