close

語法說明:

1.在 <div id="t1" style="z-index:1;top:170;left:0;position:absolute;color:#FFB6C1;font-size:10pt"><b>小林工作室</b></div> 中修改後景的色彩及文字
2.在 <div id="t2" style="z-index:2;top:172;left:0;position:absolute;color:#C71585;font-size:10pt"><b>小林工作室</b></div> 中修改前景的色彩及文字
3.在 var spx=50 中修改文字跳動的速度
4.在 var spt=170 中修改跳動訊息的垂直位置


<!--跳動重疊文字_開始-->
<!--在這裡設定後景的色彩及文字-->
<div id="t1" style="z-index:1;top:170;left:0;position:absolute;color:#FFB6C1;font-size:10pt"><b>小林工作室</b></div>
<!--在這裡設定前景的色彩及文字-->
<div id="t2" style="z-index:2;top:172;left:0;position:absolute;color:#C71585;font-size:10pt"><b>小林工作室</b></div>
<script language="JavaScript">
<!--
var c,d=7
<!--在這裡設定文字跳動的速度-->
var spx=50
<!--在這裡設定跳動訊息的垂直位置-->
var spt=170
var T1=document.getElementById?document.getElementById("t1"):document.all?document.all.t1:documet.layers.t1
var T2=document.getElementById?document.getElementById("t2"):document.all?document.all.t2:documet.layers.t2
T1.css=T1.style||T1
T2.css=T2.style||T2
function move(){
 T1.css.left=parseInt(T1.css.left)+d
 T1.css.top=Math.round(Math.sin(parseInt(T1.css.left)))*5+spt
 T2.css.top=parseInt(T1.css.top)+3
 T2.css.left=parseInt(T1.css.left)+4
 if(parseInt(T1.css.left)>(parseInt(document.all?document.body.offsetWidth:self.innerWidth)-parseInt(document.layers?T2.document.width:T2.offsetWidth)-50)) d=-7
 if(parseInt(T1.css.left)<15) d=7}
function gocenter(){
 T1.css.left=parseInt(T1.css.left)+10
 T2.css.left=parseInt(T2.css.left)-10
 if(parseInt(T1.css.left)>=parseInt(T2.css.left)){
  clearInterval(c)
  c=setInterval(move,spx)}}
T2.css.left=parseInt(document.all?document.body.offsetWidth:self.innerWidth)-parseInt(document.layers?T2.document.width:T2.offsetWidth)-50
c=setInterval(gocenter,spx)
//-->
</script>
<!--跳動重疊文字_結束-->
arrow
arrow
    全站熱搜

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