这是 llrock (百乐宝) 写的一段代码:<SCRIPT LANGUAGE="JavaScript">
<!--  //csdn llrock (百乐宝)  
function start(){
SG1.Scale(0.50, 0.50, 0.50)
SG2.Scale(0.50, 0.50, 0.50)
//SG3.Scale(0.50, 0.50, 0.50)
SG4.Scale(0.50, 0.50, 0.50)
SG5.Scale(0.50, 0.50, 0.50)
SG1.Rotate(0, 0, 0)
SG5.Rotate(90,0,0)
SG2.Rotate(90, 0, 0)
//SG3.Rotate(0, 90, 0)
rotateAll()   
}
var rotatetime=null
function rotateAll(){
     SG1.Rotate(4,6,2)
     SG2.Rotate(4,6,2)
  //   SG3.Rotate(4,6,2)
     SG4.Rotate(4,6,2)
 SG5.Rotate(4,6,2)
rotatetime=setTimeout("rotateAll()", 20)
}
//-->
</SCRIPT>
<META content="text/html; CHARSET=iso8859-1" http-equiv=Content-Type>
<META content=EN-US name=MS.LOCALE>
<META content=noindex name=ROBOTS>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
</HEAD>
<BODY bgColor="transparent" onload="start()">
<OBJECT classid=CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6 id=SG4 style="HEIGHT: 150px; LEFT: 0px; POSITION: absolute; TOP: 0px; WIDTH: 150px; ZINDEX: 0">
  <PARAM NAME="Line0001" VALUE="SetLineStyle(0)">
  <PARAM NAME="Line0002" VALUE="SetFillColor(164, 164, 255)">
  <PARAM NAME="Line0003" VALUE="SetFillStyle(1)">
  <PARAM NAME="Line0004" VALUE="SetFont('Arial', 100, 100, 0, 0, 0)">
  <PARAM NAME="Line0005" VALUE="Text('LLrock', -95, 0)">
</OBJECT>
<OBJECT classid=CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6 id=SG1 style="HEIGHT: 150px; LEFT:0px; POSITION: absolute; TOP: 0px; WIDTH: 150px;ZINDEX: 0">
<PARAM NAME="Line0001" VALUE="SetLineStyle(1)">
<PARAM NAME="Line0002" VALUE="SetLineColor(0, 0, 0)">
<PARAM NAME="Line0003" VALUE="SetFillStyle(0)">
<PARAM NAME="Line0004" VALUE="SetFont('Arial', 100, 100, 0, 0, 0)">
<PARAM NAME="Line0005" VALUE="Text('LLrock', -95, 0)">
</OBJECT>
<OBJECT classid=CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6 id=SG2  style="HEIGHT: 150px; LEFT: 0px; POSITION: absolute; TOP: 0px; WIDTH: 150px;ZINDEX: 2">
<PARAM NAME="Line0001" VALUE="SetLineStyle(1)">
<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">
<PARAM NAME="Line0003" VALUE="SetFillStyle(0)">
<PARAM NAME="Line0004" VALUE="SetFont('Arial', 100, 100, 0, 0, 0)">
<PARAM NAME="Line0005" VALUE="Text('BBrock', -95, 0)">
</OBJECT>
<OBJECT classid=CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6 id=SG5  style="HEIGHT: 150px; LEFT: 0px; POSITION: absolute; TOP:0px; WIDTH: 150px;ZINDEX: 0">
  <PARAM NAME="Line0001" VALUE="SetLineStyle(0)">
  <PARAM NAME="Line0002" VALUE="SetFillColor(255, 111,210)">
  <PARAM NAME="Line0003" VALUE="SetFillStyle(1)">
  <PARAM NAME="Line0004" VALUE="SetFont('Arial',100, 100, 0, 0, 0)">
  <PARAM NAME="Line0005" VALUE="Text('BBrock', -95, 0)">
</OBJECT>
<OBJECT classid=CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6 id=SG3  style="HEIGHT: 150px; LEFT: 0px; POSITION: absolute; TOP:0px; WIDTH: 150px; ZINDEX: 1">
<PARAM NAME="Line0001" VALUE="SetLineStyle(1)">
<PARAM NAME="Line0002" VALUE="SetLineColor(255, 0,0)">
<PARAM NAME="Line0003" VALUE="SetFillStyle(0)">
<PARAM NAME="Line0004" VALUE="SetFont('Arial', 50, 50, 0, 0, 0)">
<PARAM NAME="Line0005" VALUE="Text('Love', -50, 0)">
</OBJECT>
</BODY>
</HTML>

解决方案 »

  1.   

    <html>
    <script language="JavaScript">
    <!-- Logo Orbit II [email protected]='欢迎来到沙虫的网';
    logoFont='Arial';
    logoSize=9;
    logoColor='red';
    logoWidth=40;
    logoHeight=40;
    logoSpeed=0.03;
    //Nothing needs altering below!
    yourLogo=yourLogo.split('');
    L=yourLogo.length; 
    Result="<font face="+logoFont+" style='font-size:"+logoSize+"pt' color="+logoColor+">";
    TrigSplit=360/L;
    br=(document.layers)?1:0;
    if (br){
    for (i=0; i < L; i++)
    document.write('<layer name="ns'+i+'" top=0 left=0 width=14 height=14">'+Result+yourLogo[i]+'</font></layer>');
    }
    else{
    document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i < L; i++)
    document.write('<div id="ie" style="position:absolute;top:0px;left:0px;width:14px;height:14px">'+Result+yourLogo[i]+'</font></div>');
    document.write('</div></div>');
    }
    ypos=100;
    xpos=100;
    step=logoSpeed;
    currStep=0;
    Y=new Array();
    X=new Array();
    Yn=new Array();
    Xn=new Array();
    for (i=0; i < L; i++) 
     {
     Yn[i]=0;
     Xn[i]=0;
     }
    (document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
    function Mouse(evnt){
     ypos = (document.layers)?evnt.pageY:event.y;
     xpos = (document.layers)?evnt.pageX:event.x;
    }
    //(document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
    function animateLogo(){
    if (!br)outer.style.pixelTop=document.body.scrollTop; 
    for (i=0; i < L; i++){
    var layer=(document.layers)?document.layers['ns'+i]:ie[i].style;
    layer.top =Y[i]+logoHeight*Math.sin(currStep+i*TrigSplit*Math.PI/180);
    layer.left=X[i]+logoWidth*Math.cos(currStep+i*TrigSplit*Math.PI/180);
    }
    currStep-=step;
    }
    function Delay(){
    for (i=L; i >= 0; i--)
    {
    Y[i]=Yn[i]+=(ypos-Yn[i])*(0.1+i/L);           
    X[i]=Xn[i]+=(xpos-Xn[i])*(0.1+i/L);        
    }
    animateLogo();
    setTimeout('Delay()',20);
    }
    window.onload=Delay;
    // -->
    </script>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <style>
    <!--
    body, td, div { font-family: Verdana; font-size: 9pt }
    -->
    </style>
    <title>围绕鼠标转动的文字-51windows.com</title>
    </head><body>
    </body></html>