127、重叠显示的文字

127、重叠显示的文字

脚本说明:

第一步:把如下代码加入<body>区域中

<script type="text/javascript">

<!--

       function Go(){return}

 

       var AgntUsr=navigator.userAgent.toLowerCase();

       var DomYes=(document.getElementById)?1:0;                        // DOM

       var NavYes=(AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1)?1:0;     // Netscape

       var ExpYes=(AgntUsr.indexOf('msie')!=-1)?1:0;                       // IExplorer

       var Opr5=(AgntUsr.indexOf('opera 5')!=-1)?1:0;                      // Opera 5

       var DomNav=(DomYes&&NavYes)?1:0;                                 // Netscape 6 up

      var DomExp=(DomYes&&ExpYes)?1:0;                                 // IExplorer 5 up

       var Nav4=(NavYes&&!DomYes&&document.layers)?1:0;                // Netscape 4

       var Exp4=(ExpYes&&!DomYes&&document.all)?1:0;                           // IExplorer 4

 

       var StartS=1314,StartT=1062,DeltaS=20,DeltaT=17.5,ShdLyr,TpLyr,Counter=100,IntTimer,DeltaDelta=.15;

 

       function ShowLogo(){

              ShdLyr=(DomYes)?document.getElementById('Shd'):(Nav4)?document.layers['Shd']:document.all['Shd'];

              TpLyr=(DomYes)?document.getElementById('Tp'):(Nav4)?document.layers['Tp']:document.all['Tp'];

              ShdStyle=(Nav4)?ShdLyr:ShdLyr.style;

              TpStyle=(Nav4)?TpLyr:TpLyr.style;

              ShdStyle.left=StartS;

              TpStyle.left=StartT;

              ShdStyle.visibility=TpStyle.visibility=(Nav4)?'show':'visible';

              IntTimer=setInterval('MoveLogo()',25)}

 

       function MoveLogo(){

              StartS-=DeltaS;

              StartT-=DeltaT;

              DeltaS-=DeltaDelta;

              DeltaT-=DeltaDelta;

              ShdStyle.left=StartS;

              TpStyle.left=StartT;

              Counter--;

              if(!Counter)clearInterval(IntTimer)}

//-->

</script>

<div class="t1" id="ppkoabcd">这是重叠的文字</div>

<div class="shadow" id="Shd">这是重叠的文字</div>

<div class="top" id="Tp">这是重叠的文字</div>

<style type="text/css">

<!--

.t1                 {color: red; text-align: center; font: 45px/45px;}

.shadow,.top                 {position:absolute; width:500pt; font-size:36pt; visibility:hidden}

.shadow                        {top:8pt; left:16pt; color: green; text-align: center; font: 45px/45px;}

.top                       {top:7pt; left:15pt; color: blue; text-align: center; font: 45px/45px;}

//-->

</style>

 

 

 

第二步:请把<body>中的内容改为:

<body bgcolor="#fef4d9" onload="ShowLogo();">

 

Write a comment

Comments: 0