• 2010-03-31

    飞舞的文字 - [网页资料]

    Tag:

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://www.blogbus.com/dickmoore-logs/70835678.html

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

    <SCRIPT> ­

    function setVariables(){ ­

    if (navigator.appName == "Netscape") h=".left=", v=".top=",dS="document.",sD=""; ­

    else h=".pixelLeft=",v=".pixelTop=",dS="",sD=".style";} ­

    var y = 200; ­

    var x = 300; ­

    var inc=0; ­

    var X = 250; ­

    var Y = 150; ­

    function moveLetters() { ­

    for ( j = 0 ; j <26 ; j++ ) { ­

       objectX="object"+j ­

    eval(dS + objectX +sD + v + (Y + Math.cos((20*Math.sin(inc/20))+j*70)*y*(Math.sin(10+inc/10)+0.2)*Math.cos((inc + j*25)/10))); ­

    eval(dS + objectX + sD + h + (X + Math.sin((20*Math.sin(inc/20))+j*70)*x*(Math.sin(10+inc/10)+0.2)*Math.cos((inc + j*25)/10))); ­

    } ­

    inc+=.2; ­

    setTimeout("moveLetters()", 1); ­

    } ­

    </SCRIPT> ­

    <DIV id=object0 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff0000 size=+4>精</FONT> </DIV> ­

    <DIV id=object1 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0fff00 size=+4>彩</FONT> </DIV> ­

    <DIV id=object2 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff00ff size=+4>纷</FONT> </DIV> ­

    <DIV id=object3 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0080ff size=+4>呈</FONT> </DIV> ­

    <DIV id=object4 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff8000 size=+4>J</FONT> </DIV> ­

    <DIV id=object5 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#008000 size=+4>A</FONT> </DIV> ­

    <DIV id=object6 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#8000ff size=+4>V</FONT> </DIV> ­

    <DIV id=object7 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff0000 size=+4>A</FONT> </DIV> ­

    <DIV id=object8 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0fff00 size=+4>S</FONT> </DIV> ­

    <DIV id=object9 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff00ff size=+4>C</FONT> </DIV> ­

    <DIV id=object10 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0080ff size=+4>R</FONT> </DIV> ­

    <DIV id=object11 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff8000 size=+4>I</FONT> </DIV> ­

    <DIV id=object12 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#008000 size=+4>P</FONT> </DIV> ­

    <DIV id=object13 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#8000ff size=+4>T</FONT> </DIV> ­

    <DIV id=object14 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff0000 size=+4>欢</FONT> </DIV> ­

    <DIV id=object15 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0fff00 size=+4>迎</FONT> </DIV> ­

    <DIV id=object16 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff00ff size=+4>您</FONT> </DIV> ­

    <DIV id=object17 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0080ff size=+4>的</FONT> </DIV> ­

    <DIV id=object18 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff8000 size=+4>光</FONT> </DIV> ­

    <DIV id=object19 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#008000 size=+4>临</FONT> </DIV> ­

    <DIV id=object20 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#8000ff size=+4>请</FONT> </DIV> ­

    <DIV id=object21 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff0000 size=+4>多</FONT> </DIV> ­

    <DIV id=object22 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0fff00 size=+4>提</FONT> </DIV> ­

    <DIV id=object23 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff00ff size=+4>意</FONT> </DIV> ­

    <DIV id=object24 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#0080ff size=+4>见</FONT> </DIV> ­

    <DIV id=object25 ­

    style="LEFT: 250px; POSITION: absolute; TOP: 150px; Z-INDEX: 2"><FONT ­

    color=#ff8000 size=+4>哟</FONT> </DIV> ­

    ­第二步:把如下代码加入<body>区域中<body onload=setVariables(),moveLetters()>­

    分享到:

    历史上的今天:

    变色的文字 2010-03-31
    闪光的文字 2010-03-31
    打字效果 2010-03-31