語法說明:

  • 在 tT="小林工作室"; 中修改實體文字的內容
  • 在 sT="小林工作室"; 中修改陰影文字的內容
  • 在 tF="細明體"; 中修改實體文字的字體
  • 在 sF="細明體"; 中修改陰影文字的字體
  • 在 tS=50; 中修改實體文字的大小
  • 在 sS=50; 中修改陰影文字的大小
  • 在 tC="#FF0000"; 中修改實體文字的顏色
  • 在 sC="#3F3F3F"; 中修改陰影文字的顏色
  • 在 ea=-8; 中修改實體文字與陰影文字之間的距離
  • 在 mPLS=true; 中設定陰影是否隨滑鼠移動 (true為要;false為不要)
  • 在 xan=-0.5; 及 yan=-0.5; 中修改預設陰影的樣式 
  • 在 iT=1; 中修改陰影文字的粗糙程度
  • 在 <div id="main" style="position: absolute; width: 100%; height: 100; left: 300; top: 90"></div> 中修改特效的寬度、高度、距離視窗左方的距離、距離視窗上方的距離


<!--陰影文字_開始-->
<body onLoad="init()" onUnload="if(Ti)clearInterval(Ti)">
<script language="Javascript">
<!--
function init(){
 tT="小林工作室";
 sT="小林工作室";
 tF="細明體";"Verdana,Georgia";
 sF="細明體";"Verdana,Georgia";
 tS=50;
 sS=50;
 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: 300; top: 190"></div>
<!--陰影文字_結束-->

arrow
arrow
    全站熱搜

    nicole 發表在 痞客邦 留言(0) 人氣()