网页特效:三色鼠标,第1张

网页特效:三色鼠标,第2张

要完成此效果把如下代码加入到区域中

  <script language="Javascript">
   var a_Colour='ff0000';
   var b_Colour='00ff00';
   var c_Colour='0000ff';
   var Size=50;
   var YDummy=new Array(),XDummy=new Array(),xpos=0,ypos=0,ThisStep=0;step=0.03;
   if (document.layers){
    window.captureEvents(Event.MOUSEMOVE);
    function nsMouse(evnt){
    xpos = window.pageYOffset+evnt.pageX+6;
    ypos = window.pageYOffset+evnt.pageY+16;
   }
    window.onMouseMove = nsMouse;
   }
   else if (document.all)
   {
    function ieMouse(){
    xpos = document.body.scrollLeft+event.x+6;
    ypos = document.body.scrollTop+event.y+16;
    }
    document.onmousemove = ieMouse;
   }
   function swirl(){
    for (i = 0; i < 3; i++)
    {
    YDummy[i]=ypos+Size*Math.cos(ThisStep+i*2)*Math.sin((ThisStep)*6);
    XDummy[i]=xpos+Size*Math.sin(ThisStep+i*2)*Math.sin((ThisStep)*6);
    }
    ThisStep+=step;
    setTimeout('swirl()',10);
   }
   var amount=10;
   if (document.layers){
    for (i = 0; i < amount; i++)
    {
    document.write(' ');
    document.write(' ');
    document.write(' ');
    }
   }

位律师回复
DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
白度搜_经验知识百科全书 » 网页特效:三色鼠标

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情