上一页       3     4     5     6            下一页

 

文字特效代码2

Tue

24

Feb

2009

60、大量文字的拖动处理

60、大量文字的拖动处理

脚本说明:

把如下代码加入<body>区域中

<SCRIPT language=javascript>

 

var upH = 17;

var upW = 15;

var downH = 17;

var downW = 15;

var dragH = 27;

var dragW = 17;

var scrollH = 90;

var speed =15;

 

 

 

 

var dom = document.getElementById ? true:false;

var nn4 = document.layers ? true:false;

var ie4 = document.all ? true:false;

 

var mouseY;

var mouseX;

 

var clickUp = false;

var clickDown = false;

var clickDrag = false;

var clickAbove = false;

var clickBelow = false;

 

var timer = setTimeout("",500);

var upL;

var upT;

var downL;

var downT;

var dragL;

var dragT;

var rulerL;

var rulerT;

var contentT;

var contentH;

var contentClipH;

var scrollLength;

var startY;

 

 

function down(e){

       if((document.layers && e.which!=1) || (document.all && event.button!=1)) return true; // Enables the right mousebutton         

       getMouse(e);

       startY = (mouseY - dragT);

      

 

       if(mouseX >= upL && (mouseX <= (upL + upW)) && mouseY >= upT && (mouseY <= (upT + upH))){

              clickUp = true;

              return scrollUp();

       }    

 

       else if(mouseX >= downL && (mouseX <= (downL + downW)) && mouseY >= downT && (mouseY <= (downT + downH))){

              clickDown = true;

              return scrollDown();

       }

 

       else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= dragT && (mouseY <= (dragT + dragH))){

              clickDrag = true;

              return false;

       }

       else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= rulerT && (mouseY <= (rulerT + scrollH))){

 

              if(mouseY < dragT){

                     clickAbove = true;

                     clickUp = true;

                     return scrollUp();

              }

      

              else{

                     clickBelow = true;

                     clickDown = true;

                     return scrollDown();

              }

       }

 

       else{

              return true;

       }

}

 

 

function move(e){

       if(clickDrag && contentH > contentClipH){

              getMouse(e);

              dragT = (mouseY - startY);

             

              if(dragT < (rulerT))

                     dragT = rulerT;            

              if(dragT > (rulerT + scrollH - dragH))

                     dragT = (rulerT + scrollH - dragH);

             

              contentT = ((dragT - rulerT)*(1/scrollLength));

              contentT = eval('-' + contentT);

 

              moveTo();

       }

 

       if(ie4)

              return false;

}

 

function up(){

       clearTimeout(timer);

 

       clickUp = false;

       clickDown = false;

       clickDrag = false;

       clickAbove = false;

       clickBelow = false;

       return true;

}

 

 

function getT(){

       if(ie4)

              contentT = document.all.content.style.pixelTop;

       else if(nn4)

              contentT = document.contentClip.document.content.top;

       else if(dom)

              contentT = parseInt(document.getElementById("content").style.top);

}

 

 

function getMouse(e){

       if(ie4){

              mouseY = event.clientY;

              mouseX = event.clientX;

       }

       else if(nn4 || dom){

              mouseY = e.pageY;

              mouseX = e.pageX;

       }

}

 

 

function moveTo(){

       if(ie4){

              document.all.content.style.top = contentT;

              document.all.ruler.style.top = dragT;

              document.all.drag.style.top = dragT;

       }

       else if(nn4){

              document.contentClip.document.content.top = contentT;

              document.ruler.top = dragT;

              document.drag.top = dragT;

       }

       else if(dom){

              document.getElementById("content").style.top = contentT + "px";

              document.getElementById("drag").style.top = dragT + "px";

              document.getElementById("ruler").style.top = dragT + "px";

       }

}

 

 

function scrollUp(){

       getT();

      

       if(clickAbove){

              if(dragT <= (mouseY-(dragH/2)))

                     return up();

       }

      

       if(clickUp){

              if(contentT < 0){          

                     dragT = dragT - (speed*scrollLength);

                    

                     if(dragT < (rulerT))

                            dragT = rulerT;

                           

                     contentT = contentT + speed;

                     if(contentT > 0)

                            contentT = 0;

                    

                     moveTo();

                     timer = setTimeout("scrollUp()",25);

              }

       }

       return false;

}

 

 

function scrollDown(){

       getT();

      

       if(clickBelow){

              if(dragT >= (mouseY-(dragH/2)))

                     return up();

       }

 

       if(clickDown){

              if(contentT > -(contentH - contentClipH)){               

                     dragT = dragT + (speed*scrollLength);

                     if(dragT > (rulerT + scrollH - dragH))

                            dragT = (rulerT + scrollH - dragH);

                    

                     contentT = contentT - speed;

                     if(contentT < -(contentH - contentClipH))

                            contentT = -(contentH - contentClipH);

                    

                     moveTo();

                     timer = setTimeout("scrollDown()",25);

              }

       }

       return false;

}

 

 

function reloadPage(){

       location.reload();

}

 

 

function eventLoader(){

       if(ie4){

      

              upL = document.all.up.style.pixelLeft;

              upT = document.all.up.style.pixelTop;        

 

              downL = document.all.down.style.pixelLeft;

              downT = document.all.down.style.pixelTop;

             

              dragL = document.all.drag.style.pixelLeft;

              dragT = document.all.drag.style.pixelTop;          

 

              rulerT = document.all.ruler.style.pixelTop;         

 

              contentH = document.all.content.offsetHeight;

              contentClipH = document.all.contentClip.offsetHeight;

       }

       else if(nn4){

      

              upL = document.up.left;

              upT = document.up.top;       

 

              downL = document.down.left;

              downT = document.down.top;            

 

              dragL = document.drag.left;

              dragT = document.drag.top;        

             

              rulerT = document.ruler.top;

      

              contentH = document.contentClip.document.content.clip.bottom;

              contentClipH = document.contentClip.clip.bottom;

       }

       else if(dom){

      

              upL = parseInt(document.getElementById("up").style.left);

              upT = parseInt(document.getElementById("up").style.top);

             

              downL = parseInt(document.getElementById("down").style.left);

              downT = parseInt(document.getElementById("down").style.top);

      

              dragL = parseInt(document.getElementById("drag").style.left);

              dragT = parseInt(document.getElementById("drag").style.top);

      

              rulerT = parseInt(document.getElementById("ruler").style.top);

 

              contentH = document.getElementById("content").offsetHeight;

              contentClipH = document.getElementById("contentClip").offsetHeight;

              document.getElementById("content").style.top = 0 + "px";

             

       }

      

       scrollLength = ((scrollH-dragH)/(contentH-contentClipH));

 

       if(nn4){

              document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP)

              window.onresize = reloadPage;

       }

       document.onmousedown = down;

       document.onmousemove = move;

       document.onmouseup = up;

}

 

</SCRIPT>

 

<STYLE type=text/css>#body {

       HEIGHT: 100%; MARGIN: 0px; OVERFLOW: hidden; WIDTH: 100%

}

#content {

       LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: visible

}

A:hover {

       FONT-SIZE: 9pt; TEXT-DECORATION: underline

}

A:link {

       FONT-SIZE: 9pt; TEXT-DECORATION: none; 000000;: "宋体"

}

A:visited {

       COLOR: #666666; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; TEXT-DECORATION: none

}

TD {

       FONT-FAMILY: "宋体"; FONT-SIZE: 9pt

}

.90E {

       COLOR: #000000; FONT-FAMILY: "arial"; FONT-SIZE: 9pt

}

.txtfield {

       BACKGROUND-COLOR: #ccffcc; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt

}

#scroll {

       HEIGHT: 351px; LEFT: 180px; POSITION: absolute; TOP: 1px; VISIBILITY: visible; WIDTH: 17px

}

</STYLE>

<BODY aLink=#616161 bgColor=#ebece0 link=#616161 onload=eventLoader();

text=#616161 topMargin=9 vLink=#616161 marginwidth="10" marginheight="9">

<DIV id=up

style="HEIGHT: 15px; LEFT: 161px; POSITION: absolute; TOP: 2px; VISIBILITY: visible; WIDTH: 17px; Z-INDEX: 1"><IMG

height=20 src="up.gif" width=13></DIV>

<DIV id=down

style="HEIGHT: 15px; LEFT: 161px; POSITION: absolute; TOP: 112px; VISIBILITY: visible; WIDTH: 17px; Z-INDEX: 2"><IMG

height=20 src="down.gif" width=13></DIV>

<DIV id=drag

style="HEIGHT: 27px; LEFT: 161px; POSITION: absolute; TOP: 23px; VISIBILITY: visible; WIDTH: 7px; Z-INDEX: 5"><IMG

height=25 src="scroller.gif" width=13></DIV>

<DIV id=ruler

style="HEIGHT: 27px; LEFT: 161px; POSITION: absolute; TOP: 23px; VISIBILITY: visible; WIDTH: 17px; Z-INDEX: 6"></DIV>

<DIV id=contentClip

style="CLIP: rect(0px 750px 345px 0px); HEIGHT: 133px; LEFT: 1px; OVERFLOW: hidden; POSITION: absolute; TOP: 0px; VISIBILITY: visible; WIDTH: 163px; Z-INDEX: 7">

<DIV id=content style="HEIGHT: 100px; LEFT: -9px; TOP: 1px; WIDTH: 170px">

<DIV align=left>

<TABLE border=0 borderColor=#99cc00 cellPadding=0 cellSpacing=4 width="100%">

  <TBODY>

  <TR>

    <TD bgColor=#ffffff width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>酒店开展"优质服务月"活动</FONT> </TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>南洋海景酒店阿里山俱乐部</FONT> </TD></TR>

  <TR>

    <TD bgColor=#ffffff width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>南洋海景酒店试营业新闻发布会 </FONT></TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>网络化商务酒店的先锋--珠海南洋海景酒店 </FONT></TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>网络化商务酒店的先锋--珠海南洋海景酒店 </FONT></TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>网络化商务酒店的先锋--珠海南洋海景酒店 </FONT></TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>南洋海景酒店试营业新闻发布会 </FONT></TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>酒店开展"优质服务月"活动</FONT> </TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>南洋海景酒店试营业新闻发布会 </FONT></TD></TR>

  <TR>

    <TD width="4%"> </TD>

    <TD width="96%"><FONT color=#000000>南洋海景酒店试营业新闻发布会 </FONT></TD></TR>

  <TR>

    <TD height=13 width="4%"> </TD>

    <TD align=right height=13 width="96%"><FONT color=#000000><IMG height=9

      src="more.gif" width=20><FONT

    color=#ff6600>更多信息</FONT></FONT></TD></TR></TBODY></TABLE>

<P> </P></DIV></DIV></DIV>

 

0 Comments

Tue

24

Feb

2009

59、样式表控制相应文字

59、样式表控制相应文字

脚本说明:

把如下代码加入<body>区域中

 

<STYLE>

BODY {font-size: 8pt; font-family: Arial;}

.datahead {font-size: 8pt; font-family: Arial; background-color: #505050; color: #FFFFFF; border: "1 solid"; border-top-color: "#909090"; border-left-color: "#909090"; border-right-color: "#303030"; border-bottom-color: "#303030";}

.dataitem {font-size: 8pt; font-family: Arial; background-color: #C0C0C0; color: #000000; border: "1 solid"; border-top-color: "#CFCFCF"; border-left-color: "#CFCFCF"; border-right-color: "#505050"; border-bottom-color: "#505050";}

</STYLE>

<SCRIPT>

function fnSetData(){

       for(var i=1;i<oData.rows.length;i++)

       {

              var oWorkRow=oData.rows(i);

              oWorkRow.cells(1).innerText=eval("oScratch.style." + oWorkRow.cells(0).innerText);

              oWorkRow.cells(2).innerText=eval("oScratch.runtimeStyle." + oWorkRow.cells(0).innerText);

              oWorkRow.cells(3).innerText=eval("oScratch.currentStyle." + oWorkRow.cells(0).innerText);                           

       }

}

 

function fnChangeStyle(oStyle,sValue){

       if(sValue.indexOf("CLEAR")>-1){

              sValue="";

       }

       eval("oScratch.runtimeStyle." + oStyle + "='" + sValue + "'");

       fnSetData();

}

 

function fnInit(){

       fnSetData();

}

window.onload = fnInit;

</SCRIPT>

<H1>样式表控制相应文字</H1>

 

<DIV ID="oScratch" STYLE="border: '5 solid'; border-color: #101010; background-color: #CFCFCF; color: #000000; font-size: 12pt; font-family: 'Arial';">    海湾战争以前,萨达姆在不少阿拉伯人,特别是巴勒斯坦人眼中是头“雄狮”,似乎只有他才能带领阿拉伯兄弟击败以色列并解放被占领土。人们希望萨达姆能让貌合神离的阿拉伯国家重新团结一心,然后利用伊拉克丰富的石油资源来建设一个现代化强国。然而,十多年过去了,人们对萨达姆的期望逐渐消失了,许多巴勒斯坦难民对记者表示,这位伊拉克领导人没有信仰,每天要做的事情仅仅是思考如何保住自己的统治地位。当年,他们曾为萨达姆向以色列发射的39枚“飞毛腿”导弹而欢欣鼓舞,并认为自己“翻身时候到了”,现在这些希望都落空了。

<P>    从开罗到安曼,普通民众在谈到伊拉克的时候,无不担心这个国家里哪些饱经苦难的百姓能否再次经受得住美国各类新式武器的狂轰滥炸,虽然他们对反复无常的萨达姆政权已经不再“感兴趣”,但对美国趾高气扬行径的憎恶程度却没有丝毫降低。不过,目前依然有许多巴勒斯坦人非常支持萨达姆,因为只有这位领导人坚持不断出来谴责以色列,尽管这种口头抨击似乎没有任何作用,但至少能给他们少许安慰。阿拉伯人表示,美国发动对伊拉克战争根本不是为了什么推进民主,而是看中了当地丰富的石油资源,并以此在确定自己在中东地区的霸主地位

</DIV>

<P>

<TABLE ID="oData">

<TR>

<TD CLASS="datahead">CSS Property</TD>

<TD CLASS="datahead">style</TD>

<TD CLASS="datahead">runtimeStyle</TD>

<TD CLASS="datahead">currentStyle</TD>

<TD CLASS="datahead"><b>Select a Value</b></TD>

</TR>

<TR>

<TD CLASS="dataitem">backgroundColor</TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"><SELECT CLASS="dataitem"  onchange="fnChangeStyle('backgroundColor',this.options(this.selectedIndex).text)">

<OPTION>Indigo

<OPTION>MistyRose

<OPTION>MediumOrchid

<OPTION>Pink

<OPTION>Yellow

<OPTION>CLEAR THIS RUNTIME STYLE

</SELECT>

</td>

</TR>

<TR>

<TD CLASS="dataitem">borderColor</TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"><SELECT CLASS="dataitem"  onchange="fnChangeStyle('borderColor',this.options(this.selectedIndex).text)">

<OPTION>Red

<OPTION>Green

<OPTION>Blue

<OPTION>Yellow

<OPTION>CLEAR THIS RUNTIME STYLE

</SELECT>

</td>

</TR>

<TR>

<TD CLASS="dataitem">color</TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"></TD>

<TD CLASS="dataitem"><SELECT CLASS="dataitem"  onchange="fnChangeStyle('color',this.options(this.selectedIndex).text)">

<OPTION>Red

<OPTION>White

<OPTION>Blue

<OPTION>Yellow

<OPTION>Silver

<OPTION>Gold

<OPTION>CLEAR THIS RUNTIME STYLE

</SELECT>

</td>

</TR>

</TABLE>

 

0 Comments

Tue

24

Feb

2009

58、超级文字滚动效果

58、超级文字滚动效果

脚本说明:

把如下代码加入<body>区域中

<script language="javascript" src="ts_files/scroll.js"></script>

 

<table border="0" cellpadding="3" cellspacing="1" align="center" bgcolor="#336699">

 

       <tr><td class="header2"><font color="#ffffff">窗口一</font></td></tr>

 

       <tr><td bgcolor="#ffffff"><SCRIPT LANGUAGE="JavaScript">Tscroll_init (0)</SCRIPT></td></tr>

 

</table>

 

<br>

 

<table border="0" cellpadding="3" cellspacing="1" align="center" bgcolor="#336699">

 

       <tr><td class="header2"><font color="#ffffff">窗口二</font></td></tr>

 

       <tr><td bgcolor="#ffffff"><SCRIPT LANGUAGE="JavaScript">Tscroll_init (1)</SCRIPT></td></tr>

 

</table>

 

0 Comments

Tue

24

Feb

2009

57、相同地方滚动新闻

57、相同地方滚动新闻

脚本说明:

把如下代码加入<body>区域中

<style type="text/css">

#dropcontentsubject{

width: 250px;

font-weight: bold;

}

 

.dropcontent{

width: 250px;

height: 200px;

border: 1px solid black;

background-color: #DFDFFF;

padding: 3px;

display:block;

}

</style>

<script type="text/javascript">

var tickspeed=2000 //ticker speed in miliseconds (2000=2 seconds)

var enablesubject=1 //enable scroller subject? Set to 0 to hide

 

if (document.getElementById){

document.write('<style type="text/css">\n')

document.write('.dropcontent{display:none;}\n')

document.write('</style>\n')

}

 

var selectedDiv=0

var totalDivs=0

 

function contractall(){

var inc=0

while (document.getElementById("dropmsg"+inc)){

document.getElementById("dropmsg"+inc).style.display="none"

inc++

}

}

function expandone(){

var selectedDivObj=document.getElementById("dropmsg"+selectedDiv)

contractall()

document.getElementById("dropcontentsubject").innerHTML=selectedDivObj.getAttribute("subject")

selectedDivObj.style.display="block"

selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0

setTimeout("expandone()",tickspeed)

}

function startscroller(){

while (document.getElementById("dropmsg"+totalDivs)!=null)

totalDivs++

expandone()

if (!enablesubject)

document.getElementById("dropcontentsubject").style.display="none"

}

if (window.addEventListener)

window.addEventListener("load", startscroller, false)

else if (window.attachEvent)

window.attachEvent("onload", startscroller)

 

</script>

<div id="dropcontentsubject"></div>

<div id="dropmsg0" class="dropcontent" subject="新浪网头条新闻">

中新网53电据中国中央电视台今晚报道,国际足联今日在苏黎世总部作出决定,原定九月在中国举办的女足世界杯将易地进行。为了弥补损失,中国将自动获得2007年世界杯的举办权目前已经有美国和澳大利亚表示愿意承办本届世界杯,但是最终将由哪个国家举办还没有定论。另外,对2006年德国世界杯是否由32支球队扩大到36支的问题,也还没有作出最后的决定。

</div>

<div id="dropmsg1" class="dropcontent" subject="网易头条新闻">

第四届女足世界杯原定于今年923日到1011在中国举行。但是国际足联在听取国际足联医学委员会的报告之后,通过了易地举办的决议。为了弥补损失,国际足联也同时承

2007年中国将获得女足世界杯的举办权。目前已经有美国和澳大利亚表示愿意承办本届世界杯,但是最终将由哪个国家举办还没有定论。另外,对2006年德国世界杯是否由32支球队扩大到36支的问题,也还没有作出最后的决定。

</div>

<div id="dropmsg2" class="dropcontent" subject="搜狐头条新闻">

目前已经有美国和澳大利亚表示愿意承办本届世界杯,但是最终将由哪个国家举办还没有定论。另外,对2006年德国世界杯是否由32支球队扩大到36支的问题,也还没有作出最后的决定。目前已经有美国和澳大利亚表示愿意承办本届世界杯,但是最终将由哪个国家举办还没有定论。另外,对2006年德国世界杯是否由32支球队扩大到36支的问题,也还没有作出最后的决定。

</div>

 

0 Comments

Mon

23

Feb

2009

56、文字的变换导航

56、文字的变换导航

脚本说明:

把如下代码加入<body>区域中

<style type="text/css">

body { background-color:#ffcc77; font-family:"Verdana", sans-serif; font-size:20px; font-weight:bold;}

 

a.links{ font-family:"Verdana", sans-serif; font-size:20px; line-height:30px; color:black; text-decoration:none; font-weight:bold;}

 

a.links:active { color:black; }

 

a.links:hover { }

</style>

<script language="javascript" type="text/javascript">

<!--

// convert a single digit (0 - 16) into hex

function enHex(aDigit)

{

    return("0123456789ABCDEF".substring(aDigit, aDigit+1))

}

// convert a hex digit into decimal

function deHex(aDigit)

{

    return("0123456789ABCDEF".indexOf(aDigit))

}

 

// Convert a 24bit number to hex

function toHex(n)

{

    return (enHex((0xf00000 & n) >> 20) +

            enHex((0x0f0000 & n) >> 16) +

            enHex((0x00f000 & n) >> 12) +

            enHex((0x000f00 & n) >>  8) +

            enHex((0x0000f0 & n) >>  4) +

            enHex((0x00000f & n) >>  0))

}

// Convert a six character hex to decimal

function toDecimal(hexNum)

{

     var tmp = ""+hexNum.toUpperCase()

    while (tmp.length < 6) tmp = "0"+tmp

     return ((deHex(tmp.substring(0,1)) << 20) +

             (deHex(tmp.substring(1,2)) << 16) +

            (deHex(tmp.substring(2,3)) << 12) +

            (deHex(tmp.substring(3,4)) << 8) +

            (deHex(tmp.substring(4,5)) << 4) +

             (deHex(tmp.substring(5,6))))

}

///////////////////Shimmering Links/////////////////////

//global variables

var hoverColour

var numLinks;

var rate;

var numFadeLevels;

var bgR;

var bgG;

var bgB;

var currR;

var currG;

var currB;

var count;

var fadeOut;

var continuous;

var newColour;

var tID;

var redInterval;

var greenInterval;

var blueInterval;

function initLinks(mouseOverColour, numberOfLinks, fadeOutColour)

{

       hoverColour = mouseOverColour;

       numLinks = numberOfLinks;

       rate = 1;

       numFadeLevels = 30;

       function initArray(theArray, length, val)

       {

              for(i=0;i<length;i++)

              {

                     theArray[i] = val;

              }

       }

       bgR = '0000' + fadeOutColour.substring(1,3)

       bgG = '0000' + fadeOutColour.substring(3,5)

       bgB = '0000' + fadeOutColour.substring(5,7)

       currR = new Array(numLinks);

       currG = new Array(numLinks);

       currB = new Array(numLinks);

       count = new Array(numLinks);

       fadeOut = new Array(numLinks);

       continuous = new Array(numLinks);

       newColour = new Array(numLinks);

       tID = new Array(numLinks);

       redInterval = toDecimal(bgR) / numFadeLevels;

       greenInterval = toDecimal(bgG) / numFadeLevels;

       blueInterval = toDecimal(bgB) / numFadeLevels;

       initArray(currR,numLinks,0);

       initArray(currG,numLinks,0);

       initArray(currB,numLinks,0);

       initArray(count,numLinks,0);

       initArray(fadeOut,numLinks,true);

       initArray(continuous,numLinks,true);

}    

function startFade(id)

{

       if(fadeOut[id] == true)

       { /*move colour towards background colour (increment)*/

              currR[id] += redInterval;

              currG[id] += greenInterval;

              currB[id] += blueInterval;

              newColour[id] = '#' + (toHex(currR[id])).substring(4,6) + (toHex(currG[id])).substring(4,6) + (toHex(currB[id])).substring(4,6);

              if(++count[id] == numFadeLevels)

              {

                     fadeOut[id] = false;

              }

       }

       else

       {

              currR[id] -= redInterval;

 

              currG[id] -= greenInterval;

 

              currB[id] -= blueInterval;

 

              newColour[id] = '#' + (toHex(currR[id])).substring(4,6) + (toHex(currG[id])).substring(4,6) + (toHex(currB[id])).substring(4,6);

 

              if(--count[id] == 0)

 

              {

 

                     fadeOut[id] = true;

 

              }

 

       }

 

       if(continuous[id] == true)

 

       {

 

              document.getElementById(id).style.color = newColour[id];             

 

       }

 

       else

 

       {

 

              document.getElementById(id).style.color = hoverColour;

 

       }

 

       clearTimeout(tID[id]);

 

       tID[id]=setTimeout('startFade(' + id + ')', rate);

 

}

 

function continueFade(id)

 

{

 

       continuous[id] = true;

 

}

 

function stopFade(id)

 

{

 

       continuous[id] = false;

 

}

 

function StartTimers()

 

{     //set up an initial set of timers to start the shimmering effect

 

       for(id=0; id<numLinks; id++)

 

       {

 

              t=setTimeout('startFade(' + id + ')', id*100);

 

       }

 

}

 

//format = initLinks('mouse-over colour', 'number of links', 'fade-out colour')

 

initLinks('#FFFFFF', 6, '#FFCC77');

 

//-->

 

</script>

<a class="links" id="0" onmouseover="stopFade('0');" onmouseout="continueFade('0');" href="http://www.7stk.com/">网页特效代码欢迎你!!!!

</a>

<br>

<a class="links" id="1" onmouseover="stopFade('1');" onmouseout="continueFade('1');" href="http://www.7stk.com/fine/ny/n1.htm">2008年祝福网页</a>

<br>

<a class="links" id="2" onmouseover="stopFade('2');" onmouseout="continueFade('2');" href="http://www.7stk.com/fine/zhufu/zhu07.htm">偏偏喜欢你-献给我深深爱过的人</a>

<br>      

<a class="links" id="3" onmouseover="stopFade('3');" onmouseout="continueFade('3');" href="http://www.7stk.com/fine/ch/c01.htm">我祝福你,圣诞节快快乐乐、幸幸福福</a>

<br>

<a class="links" id="4" onmouseover="stopFade('4');" onmouseout="continueFade('4');" href="http://7stk.com/">江苏省政府采购中心对江苏省人民医院三维</a>

<br>

<a class="links" id="5" onmouseover="stopFade('5');" onmouseout="continueFade('5');" href="http://7stk.com/">截瘫病人的福音-北京大学第三医院开展</a>

<script language="javascript" type="text/javascript">

<!--

setTimeout('StartTimers()', 1000); //initial 1 second delay to allow page to load and ensure smooth shimmering

//-->

</script>

 

0 Comments

Mon

23

Feb

2009

55、随机文字显示

55、随机文字显示

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="Javascript">

<!--

 

function text() {

};

 

text = new text();

number = 0;

 

// textArray

text[number++] = "“袭击周”拉开序幕  驻伊美军派“藤蛇”还击"

text[number++] = "布什亲自率众全面反击“伊拉克情报门”事件"

text[number++] = "伊拉克局势动荡不安 第三步兵师回国无限推迟"

text[number++] = "哈马斯等拒绝解除武装 谴责阿巴斯屈从以色列"

text[number++] = "自称与基地组织有关团体宣称在背后袭击美军"

// keep adding items here...

 

increment = Math.floor(Math.random() * number);

 

document.write(text[increment]);

 

//-->

</SCRIPT>

 

0 Comments

Mon

23

Feb

2009

54、打字机打彩色文字

54、打字机打彩色文字

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

 

<SCRIPT language="JavaScript">

<!--

 

var layers = document.layers, style = document.all, both = layers || style, idme=908601;

if (layers) { layerRef = 'document.layers'; styleRef = ''; } if (style) { layerRef = 'document.all'; styleRef = '.style'; }

 

function writeOnText(obj, str) {

if (layers) with (document[obj]) { document.open(); document.write(str); document.close(); }

if (style) eval(obj+'.innerHTML= str');

}

//以下是输出的内容,自己修改即可。

var dispStr = new Array(

"<font color=red size=3>欢迎光临“网页特效集锦”...</font><br><font color=green size=3>你知道怎样在你的网页中做一个很酷的网页菜单吗?</font><br><font color=red size=3>你知道怎样让你的网页背景向上或向下移动吗?</font><br><font color=blue size=3>你知道怎样在你的主页中任意位置显示一个时钟吗?</font><br><font color=red size=3>你知道怎样在主页中做特效文字吗?</font><br><font color=black size=3>你知道怎样做一个很cool的日历吗?</font>"

);

 

var overMe=0;

 

function txtTyper(str, idx, idObj, spObj, clr1, clr2, delay, plysnd) {

var tmp0 = tmp1 = '', skip = 0;

if (both && idx <= str.length) {

if (str.charAt(idx) == '<') { while (str.charAt(idx) != '>') idx++; idx++; }

if (str.charAt(idx) == '&' && str.charAt(idx+1) != ' ') { while (str.charAt(idx) != ';') idx++; idx++; }

tmp0 = str.slice(0,idx);

tmp1 = str.charAt(idx++);

 

if (overMe==0 && plysnd==1) {

if (navigator.plugins[0]) {

if (navigator.plugins["LiveAudio"][0].type=="audio/basic" && navigator.javaEnabled()) {

document.embeds[0].stop();

setTimeout("document.embeds[0].play(false)",100); }

} else if (document.all) {

ding.Stop();

setTimeout("ding.Run()",100);

}

overMe=1;

} else overMe=0;

 

writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2+"'>"+tmp1+"</font></span>");

setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay);

}

}

 

function init() {

txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', '#339933', '#99FF33', 50, 0);

}

 

// -->

</SCRIPT>

 

 

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

 

<DIV class=ttl1 id=ttl0><SPAN class=ttl1></SPAN></DIV>

 

 

第三步:<body>改为

 

<body bgcolor="#fef4d9" onload="onload=init()">

 

 

 

 

0 Comments

Mon

23

Feb

2009

53、可移动的显示广告

53、可移动的显示广告

<html>

<head>

<title>可移动的显示层</title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

</head>

<body   bgcolor=#FFFFFF  >

<!-------------------------------->

<style>

<!--

 

#postit{

position:absolute;

width:250;

padding:5px;

background-color:lightyellow;

border:1px solid black;

visibility:hidden;

z-index:100;

cursor:hand;

}

 

-->

</style>

<div id="postit" style="left:150px;top:150px">

<div align="right"><b><a href="javascript:closeit()">[关闭]</a></b></div>

 

<b>7stk.com:</b><br>

<p><font size="2" face="Arial"><a href="http://7stk.com" target="_new">经典实例、教程库<br>

</a>汇聚网界最多的网页特效之家@</font></p>

</div>

 

<script>

 

//Post-it only once per browser session? (0=no, 1=yes)

//Specifying 0 will cause postit to display every time page is loaded

var once_per_browser=0

 

///No need to edit beyond here///

 

var ns4=document.layers

var ie4=document.all

var ns6=document.getElementById&&!document.all

 

if (ns4)

crossobj=document.layers.postit

else if (ie4||ns6)

crossobj=ns6? document.getElementById("postit") : document.all.postit

 

 

function closeit(){

if (ie4||ns6)

crossobj.style.visibility="hidden"

else if (ns4)

crossobj.visibility="hide"

}

 

function get_cookie4(Name) {

  var search = Name + "="

  var returnvalue = "";

  if (document.cookie4.length > 0) {

    offset = document.cookie4.indexOf(search)

    if (offset != -1) { // if cookie4 exists

      offset += search.length

      // set index of beginning of value

      end = document.cookie4.indexOf(";", offset);

      // set index of end of cookie4 value

      if (end == -1)

         end = document.cookie4.length;

      returnvalue=unescape(document.cookie4.substring(offset, end))

      }

   }

  return returnvalue;

}

 

function showornot(){

if (get_cookie4('postdisplay')==''){

showit()

document.cookie4="postdisplay=yes"

}

}

 

function showit(){

if (ie4||ns6)

crossobj.style.visibility="visible"

else if (ns4)

crossobj.visibility="show"

}

 

if (once_per_browser)

showornot()

else

showit()

 

</script>

 

<script language="JavaScript1.2">

 

//drag drop function for ie4+ and NS6////

/////////////////////////////////

 

function drag_drop(e){

if (ie4&&dragapproved){

crossobj.style.left=tempx+event.clientX-offsetx

crossobj.style.top=tempy+event.clientY-offsety

return false

}

else if (ns6&&dragapproved){

crossobj.style.left=tempx+e.clientX-offsetx

crossobj.style.top=tempy+e.clientY-offsety

return false

}

}

 

function initializedrag(e){

if (ie4&&event.srcElement.id=="postit"||ns6&&e.target.id=="postit"){

offsetx=ie4? event.clientX : e.clientX

offsety=ie4? event.clientY : e.clientY

 

tempx=parseInt(crossobj.style.left)

tempy=parseInt(crossobj.style.top)

 

dragapproved=true

document.onmousemove=drag_drop

}

}

document.onmousedown=initializedrag

document.onmouseup=new Function("dragapproved=false")

 

</script>

<!---------------------------------->

</body>

</html>

 

1 Comments

Mon

23

Feb

2009

52、滚动显示文字的公告栏

52、滚动显示文字的公告栏

要完成此效果需要三个步骤

 

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

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

//slider's width

var swidth=350

 

//slider's height

var sheight=72

 

//slider's speed

var sspeed=2

 

//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..</a>

var singletext=new Array()

singletext[0]='<div align="center"><font face=Arial size=3 color="white"><b>超强功能的滚动屏幕</b><br>这里可以使用超链接 <b><a href=http://www.7stk.com>网页特效代码</a></b></div></FONT>'

singletext[1]='<div align="center"><font face=Arial size=3 color="white">如果你愿意的话也可以把图片带进来使用<br><img src="sto/xx.gif" border="0"></font></div>'

singletext[2]='<div align="center"><font face=Arial size=3 color="white">当然可以根据你自己的需要再任意发挥 <i></i> <b>想像力</b></font></div>'

singletext[3]='<div align="center"><font face=Arial size=3 color="white"><b>网页特效代码</b><br>永远欢迎您</font></div>'

if (singletext.length>1)

i=1

else

i=0

function start(){

if (document.all){

ieslider1.style.top=sheight

iemarquee(ieslider1)

}

else if (document.layers){

document.ns4slider.document.ns4slider1.top=sheight

document.ns4slider.document.ns4slider1.visibility='show'

ns4marquee(document.ns4slider.document.ns4slider1)

}

else if (document.getElementById&&!document.all){

document.getElementById('ns6slider1').style.top=sheight

ns6marquee(document.getElementById('ns6slider1'))

}

}

function iemarquee(whichdiv){

iediv=eval(whichdiv)

if (iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){

iediv.style.pixelTop=0

setTimeout("iemarquee(iediv)",100)

}

if (iediv.style.pixelTop>=sheight*-1){

iediv.style.pixelTop-=sspeed

setTimeout("iemarquee(iediv)",100)

}

else{

iediv.style.pixelTop=sheight

iediv.innerHTML=singletext[i]

if (i==singletext.length-1)

i=0

else

i++

}

}

function ns4marquee(whichlayer){

ns4layer=eval(whichlayer)

if (ns4layer.top>0&&ns4layer.top<=sspeed){

ns4layer.top=0

setTimeout("ns4marquee(ns4layer)",100)

}

if (ns4layer.top>=sheight*-1){

ns4layer.top-=sspeed

setTimeout("ns4marquee(ns4layer)",100)

}

else{

ns4layer.top=sheight

ns4layer.document.write(singletext[i])

ns4layer.document.close()

if (i==singletext.length-1)

i=0

else

i++

}

}

function ns6marquee(whichdiv){

ns6div=eval(whichdiv)

if (parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){

ns6div.style.top=0

setTimeout("ns6marquee(ns6div)",100)

}

if (parseInt(ns6div.style.top)>=sheight*-1){

ns6div.style.top=parseInt(ns6div.style.top)-sspeed

setTimeout("ns6marquee(ns6div)",100)

}

else{

ns6div.style.top=sheight

ns6div.innerHTML=singletext[i]

if (i==singletext.length-1)

i=0

else

i++

}

}

//  End -->

</script>

 

 

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

 

<div align="center">

<span style="borderWidth:1; borderColor:red; width:350; height:72; background:navy">

<ilayer id="ns4slider" width="&{swidth};" height="&{sheight};">

<layer id="ns4slider1" height="&{sheight};" onmouseover="sspeed=0;" onmouseout="sspeed=2">

<script language="JavaScript">

if (document.layers)

document.write(singletext[0])

</script>

</layer></ilayer>

<script language="JavaScript">

if (document.all){

document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1 solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')

document.writeln('<div id="ieslider1" style="position:relative;width:'+swidth+';">')

document.write(singletext[0])

document.writeln('</div></div>')

}

if(document.getElementById&&!document.all){

document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1px solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')

document.writeln('<div id="ns6slider1" style="position:relative;width:'+swidth+';">')

document.write(singletext[0])

document.writeln('</div></div>')

}

</script></span>

</div>

 

 

第三步:把“onLoad="start()"”加在<body>标记里

例如:<body onLoad="start()">

 

 

0 Comments

Mon

23

Feb

2009

51、在网页中添加滚动文字

51、在网页中添加滚动文字

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

 

<script language="JavaScript">

<!--

done = 0;

step = 1

function anim(yp,yk)

{

if(document.layers) document.layers["napis"].top=yp;

else  document.all["napis"].style.top=yp;

if(yp>yk) step = -1

if(yp<60) step = 1

setTimeout('anim('+(yp+step)+','+yk+')', 35);

}

function start()

{

if(done) return

done = 1;

if(navigator.appName=="Netscape") {

document.napis.left=innerWidth/2 - 145;

anim(60,innerHeight - 60)

}

else {

napis.style.left=11;

anim(60,document.body.offsetHeight - 60)

}

}

//-->

</script>

<div id="napis" style="position: absolute;top: -50;color: #000000;font-family:宋体;font-size:9pt;">

<p>

<a href=http://www.7stk.com>网页特效</a><br>

音乐网站

</p></div>

<script language="JavaScript">

<!--

setTimeout('start()',10);

//-->

</script>

 

 

0 Comments

Mon

23

Feb

2009

50、字幕滚动效果

50、字幕滚动效果

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效---字幕滚动效果---非常酷哦(七)</title>

</head>

 

<body onload=init()>

 

<SCRIPT language=JavaScript>

function DynLayer(id,nestref,frame) {

       if (!is.ns5 && !DynLayer.set && !frame) DynLayerInit()

       this.frame = frame || self

       if (is.ns) {

              if (is.ns4) {

                     if (!frame) {

                            if (!nestref) var nestref = DynLayer.nestRefArray[id]

                            if (!DynLayerTest(id,nestref)) return

                            this.css = (nestref)? eval("document."+nestref+".document."+id) : document.layers[id]

                     }

                     else this.css = (nestref)? eval("frame.document."+nestref+".document."+id) : frame.document.layers[id]

                     this.elm = this.event = this.css

                     this.doc = this.css.document

              }

              else if (is.ns5) {

                     this.elm = document.getElementById(id)

                     this.css = this.elm.style

                     this.doc = document

              }

              this.x = this.css.left

              this.y = this.css.top

              this.w = this.css.clip.width

              this.h = this.css.clip.height

       }

       else if (is.ie) {

              this.elm = this.event = this.frame.document.all[id]

              this.css = this.frame.document.all[id].style

              this.doc = document

              this.x = this.elm.offsetLeft

              this.y = this.elm.offsetTop

              this.w = (is.ie4)? this.css.pixelWidth : this.elm.offsetWidth

              this.h = (is.ie4)? this.css.pixelHeight : this.elm.offsetHeight

       }

       this.id = id

       this.nestref = nestref

       this.obj = id + "DynLayer"

       eval(this.obj + "=this")

}

function DynLayerMoveTo(x,y) {

       if (x!=null) {

              this.x = x

              if (is.ns) this.css.left = this.x

              else this.css.pixelLeft = this.x

       }

       if (y!=null) {

              this.y = y

              if (is.ns) this.css.top = this.y

              else this.css.pixelTop = this.y

       }

}

function DynLayerMoveBy(x,y) {

       this.moveTo(this.x+x,this.y+y)

}

function DynLayerShow() {

       this.css.visibility = (is.ns4)? "show" : "visible"

}

function DynLayerHide() {

       this.css.visibility = (is.ns4)? "hide" : "hidden"

}

DynLayer.prototype.moveTo = DynLayerMoveTo

DynLayer.prototype.moveBy = DynLayerMoveBy

DynLayer.prototype.show = DynLayerShow

DynLayer.prototype.hide = DynLayerHide

DynLayerTest = new Function('return true')

 

// DynLayerInit Function

function DynLayerInit(nestref) {

       if (!DynLayer.set) DynLayer.set = true

       if (is.ns) {

              if (nestref) ref = eval('document.'+nestref+'.document')

              else {nestref = ''; ref = document;}

              for (var i=0; i<ref.layers.length; i++) {

                     var divname = ref.layers[i].name

                     DynLayer.nestRefArray[divname] = nestref

                     var index = divname.indexOf("Div")

                     if (index > 0) {

                            eval(divname.substr(0,index)+' = new DynLayer("'+divname+'","'+nestref+'")')

                     }

                     if (ref.layers[i].document.layers.length > 0) {

                            DynLayer.refArray[DynLayer.refArray.length] = (nestref=='')? ref.layers[i].name : nestref+'.document.'+ref.layers[i].name

                     }

              }

              if (DynLayer.refArray.i < DynLayer.refArray.length) {

                     DynLayerInit(DynLayer.refArray[DynLayer.refArray.i++])

              }

       }

       else if (is.ie) {

              for (var i=0; i<document.all.tags("DIV").length; i++) {

                     var divname = document.all.tags("DIV")[i].id

                     var index = divname.indexOf("Div")

                     if (index > 0) {

                            eval(divname.substr(0,index)+' = new DynLayer("'+divname+'")')

                     }

              }

       }

       return true

}

DynLayer.nestRefArray = new Array()

DynLayer.refArray = new Array()

DynLayer.refArray.i = 0

DynLayer.set = false

 

// Slide Methods

function DynLayerSlideTo(endx,endy,inc,speed,fn) {

       if (endx==null) endx = this.x

       if (endy==null) endy = this.y

       var distx = endx-this.x

       var disty = endy-this.y

       this.slideStart(endx,endy,distx,disty,inc,speed,fn)

}

function DynLayerSlideBy(distx,disty,inc,speed,fn) {

       var endx = this.x + distx

       var endy = this.y + disty

       this.slideStart(endx,endy,distx,disty,inc,speed,fn)

}

function DynLayerSlideStart(endx,endy,distx,disty,inc,speed,fn) {

       if (this.slideActive) return

       if (!inc) inc = 10

       if (!speed) speed = 20

       var num = Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc

       if (num==0) return

       var dx = distx/num

       var dy = disty/num

       if (!fn) fn = null

       this.slideActive = true

       this.slide(dx,dy,endx,endy,num,1,speed,fn)

}

function DynLayerSlide(dx,dy,endx,endy,num,i,speed,fn) {

       if (!this.slideActive) return

       if (i++ < num) {

              this.moveBy(dx,dy)

              this.onSlide()

              if (this.slideActive) setTimeout(this.obj+".slide("+dx+","+dy+","+endx+","+endy+","+num+","+i+","+speed+",\""+fn+"\")",speed)

              else this.onSlideEnd()

       }

       else {

              this.slideActive = false

              this.moveTo(endx,endy)

              this.onSlide()

              this.onSlideEnd()

              eval(fn)

       }

}

function DynLayerSlideInit() {}

DynLayer.prototype.slideInit = DynLayerSlideInit

DynLayer.prototype.slideTo = DynLayerSlideTo

DynLayer.prototype.slideBy = DynLayerSlideBy

DynLayer.prototype.slideStart = DynLayerSlideStart

DynLayer.prototype.slide = DynLayerSlide

DynLayer.prototype.onSlide = new Function()

DynLayer.prototype.onSlideEnd = new Function()

 

// Clip Methods

function DynLayerClipInit(clipTop,clipRight,clipBottom,clipLeft) {

       if (is.ie) {

              if (arguments.length==4) this.clipTo(clipTop,clipRight,clipBottom,clipLeft)

              else if (is.ie4) this.clipTo(0,this.css.pixelWidth,this.css.pixelHeight,0)

       }

}

function DynLayerClipTo(t,r,b,l) {

       if (t==null) t = this.clipValues('t')

       if (r==null) r = this.clipValues('r')

       if (b==null) b = this.clipValues('b')

       if (l==null) l = this.clipValues('l')

       if (is.ns) {

              this.css.clip.top = t

              this.css.clip.right = r

              this.css.clip.bottom = b

              this.css.clip.left = l

       }

       else if (is.ie) this.css.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)"

}

function DynLayerClipBy(t,r,b,l) {

       this.clipTo(this.clipValues('t')+t,this.clipValues('r')+r,this.clipValues('b')+b,this.clipValues('l')+l)

}

function DynLayerClipValues(which) {

       if (is.ie) var clipv = this.css.clip.split("rect(")[1].split(")")[0].split("px")

       if (which=="t") return (is.ns)? this.css.clip.top : Number(clipv[0])

       if (which=="r") return (is.ns)? this.css.clip.right : Number(clipv[1])

       if (which=="b") return (is.ns)? this.css.clip.bottom : Number(clipv[2])

       if (which=="l") return (is.ns)? this.css.clip.left : Number(clipv[3])

}

DynLayer.prototype.clipInit = DynLayerClipInit

DynLayer.prototype.clipTo = DynLayerClipTo

DynLayer.prototype.clipBy = DynLayerClipBy

DynLayer.prototype.clipValues = DynLayerClipValues

 

// Write Method

function DynLayerWrite(html) {

       if (is.ns) {

              this.doc.open()

              this.doc.write(html)

              this.doc.close()

       }

       else if (is.ie) {

              this.event.innerHTML = html

       }

}

DynLayer.prototype.write = DynLayerWrite

 

// BrowserCheck Object

function BrowserCheck() {

       var b = navigator.appName

       if (b=="Netscape") this.b = "ns"

       else if (b=="Microsoft Internet Explorer") this.b = "ie"

       else this.b = b

       this.version = navigator.appVersion

       this.v = parseInt(this.version)

       this.ns = (this.b=="ns" && this.v>=4)

       this.ns4 = (this.b=="ns" && this.v==4)

       this.ns5 = (this.b=="ns" && this.v==5)

       this.ie = (this.b=="ie" && this.v>=4)

       this.ie4 = (this.version.indexOf('MSIE 4')>0)

       this.ie5 = (this.version.indexOf('MSIE 5')>0)

       this.min = (this.ns||this.ie)

}

is = new BrowserCheck()

 

// CSS Function

function css(id,left,top,width,height,color,vis,z,other) {

       if (id=="START") return '<STYLE TYPE="text/css">\n'

       else if (id=="END") return '</STYLE>'

       var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'

       if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;'

       if (arguments.length>=5 && height!=null) {

              str += ' height:'+height+'px;'

              if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'

       }

       if (arguments.length>=6 && color!=null) str += (is.ns)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'

       if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';'

       if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';'

       if (arguments.length==9 && other!=null) str += ' '+other

       str += '}\n'

       return str

}

function writeCSS(str,showAlert) {

       str = css('START')+str+css('END')

       document.write(str)

       if (showAlert) alert(str)

}

 

</SCRIPT>

 

<SCRIPT language=JavaScript>

function MiniScroll(window,content) {

       this.window = window

       this.content = content

       this.inc = 8

       this.speed = 20

       this.contentHeight = (is.ns)? this.content.doc.height : this.content.elm.scrollHeight

       this.contentWidth = (is.ns)? this.content.doc.width : this.content.elm.scrollWidth

       this.up = MiniScrollUp

       this.down = MiniScrollDown

       this.left = MiniScrollLeft

       this.right = MiniScrollRight

       this.stop = MiniScrollStop

       this.activate = MiniScrollActivate

       this.activate(this.contentWidth,this.contentHeight)

}

function MiniScrollActivate() {

       this.offsetHeight = this.contentHeight-this.window.h

       this.offsetWidth = this.contentWidth-this.window.w

       this.enableVScroll = (this.offsetHeight>0)

       this.enableHScroll = (this.offsetWidth>0)

}

function MiniScrollUp() {

       if (this.enableVScroll) this.content.slideTo(null,0,this.inc,this.speed)

}

function MiniScrollDown() {

       if (this.enableVScroll) this.content.slideTo(null,-this.offsetHeight,this.inc,this.speed)

}

function MiniScrollLeft() {

       if (this.enableHScroll) this.content.slideTo(0,null,this.inc,this.speed)

}

function MiniScrollRight() {

       if (this.enableHScroll) this.content.slideTo(-this.offsetWidth,null,this.inc,this.speed)

}

function MiniScrollStop() {

       this.content.slideActive = false

}

 

</SCRIPT>

 

<SCRIPT language=JavaScript>

<!--

 

 

function init()

{

pulloutContent = new Array()

pulloutWindow = new Array()

pulloutScroll = new Array() 

for (var i=0;i<=4;i++) {

             

pulloutContent[i] = new DynLayer('pullout'+i+'Content')

pulloutWindow[i] = new DynLayer('pullout'+i+'Window')

pulloutWindow[i].slideInit()

pulloutScroll[i] = new MiniScroll(pulloutWindow[i],pulloutContent[i])

}

pulloutShown = 0

}

function pulloutStart(i) {

if (i!=pulloutShown) {

pulloutActive = true

pulloutWindow[pulloutShown].slideTo(-285,null,15,15,'pulloutEnd('+i+')')

       }

}

function pulloutEnd(i) {

pulloutShown = i

pulloutWindow[i].slideTo(0,null,15,15,'pulloutActive==false')

}

//-->

</SCRIPT>

 

<STYLE type=text/css>A {

       FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: 'Arial'

}

A.scroll {

       COLOR: #ffffff

}

STRONG {

       FONT-WEIGHT: bold; FONT-SIZE: 15pt; LINE-HEIGHT: 25pt; FONT-FAMILY: 'Arial'

}

P {

       FONT-SIZE: 10pt; LINE-HEIGHT: 13pt; FONT-FAMILY: 'Arial'

}

#pulloutInterface {

       LEFT: 50px; WIDTH: 400px; CLIP: rect(0px 400px 250px 0px); POSITION: absolute; TOP: 50px; HEIGHT: 250px; BACKGROUND-COLOR: #000000; layer-background-color: #000000

}

#pullout0Sidebar {

       LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 5px; HEIGHT: 30px; BACKGROUND-COLOR: #dedede; layer-background-color: #DEDEDE

}

#pullout1Sidebar {

       LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 40px; HEIGHT: 30px; BACKGROUND-COLOR: #c5c5c5; layer-background-color: #C5C5C5

}

#pullout2Sidebar {

       LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 75px; HEIGHT: 30px; BACKGROUND-COLOR: #a2a2a2; layer-background-color: #A2A2A2

}

#pullout3Sidebar {

       LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 110px; HEIGHT: 30px; BACKGROUND-COLOR: #7e7e7e; layer-background-color: #7E7E7E

}

#pullout4Sidebar {

       LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 145px; HEIGHT: 30px; BACKGROUND-COLOR: #7e7e7e; layer-background-color: #7E7E7E

}

#pulloutUpDown {

       LEFT: 5px; POSITION: absolute; TOP: 200px

}

#pulloutViewArea {

       LEFT: 110px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 5px; HEIGHT: 240px; BACKGROUND-COLOR: #000000; layer-background-color: #000000

}

#pullout0Window {

       LEFT: 0px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 0px; HEIGHT: 240px; BACKGROUND-COLOR: #dedede; layer-background-color: #DEDEDE

}

#pullout0Content {

       LEFT: 5px; WIDTH: 275px; POSITION: absolute; TOP: 0px

}

#pullout1Window {

       LEFT: -285px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 0px; HEIGHT: 240px; BACKGROUND-COLOR: #c5c5c5; layer-background-color: #C5C5C5

}

#pullout1Content {

       LEFT: 5px; WIDTH: 275px; POSITION: absolute; TOP: 0px

}

#pullout2Window {

       LEFT: -285px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 0px; HEIGHT: 240px; BACKGROUND-COLOR: #a2a2a2; layer-background-color: #A2A2A2

}

#pullout2Content {

       LEFT: 5px; WIDTH: 275px; POSITION: absolute; TOP: 0px

}

#pullout3Window {

       LEFT: -285px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 0px; HEIGHT: 240px; BACKGROUND-COLOR: #7e7e7e; layer-background-color: #7E7E7E

}

#pullout3Content {

       LEFT: 5px; WIDTH: 275px; POSITION: absolute; TOP: 0px

}

#pullout4Window {

       LEFT: -285px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 0px; HEIGHT: 240px; BACKGROUND-COLOR: #7e7e7e; layer-background-color: #7E7E7E

}

#pullout4Content {

       LEFT: 5px; WIDTH: 275px; POSITION: absolute; TOP: 0px

}

</STYLE>

<DIV id=pulloutInterface>

<DIV id=pullout0Sidebar>

<P align=center><A href="javascript:pulloutStart(0)">第一页</A></P></DIV>

<DIV id=pullout1Sidebar>

<P align=center><A href="javascript:pulloutStart(1)">第二页</A></P></DIV>

<DIV id=pullout2Sidebar>

<P align=center><A href="javascript:pulloutStart(2)">第三页</A></P></DIV>

<DIV id=pullout3Sidebar>

<P align=center><A href="javascript:pulloutStart(3)">第四页</A></P></DIV>

<DIV id=pullout4Sidebar>

<P align=center><A href="javascript:pulloutStart(4)">第五页</A></P></DIV>

<DIV id=pulloutUpDown><A onmouseup=pulloutScroll[pulloutShown].stop()

class=scroll onmousedown=pulloutScroll[pulloutShown].up()

onmouseout=pulloutScroll[pulloutShown].stop()

href="javascript://%20Scroll%20Up">向上</A> <BR><A

onmouseup=pulloutScroll[pulloutShown].stop() class=scroll

onmousedown=pulloutScroll[pulloutShown].down()

onmouseout=pulloutScroll[pulloutShown].stop()

href="javascript://%20Scroll%20Down">向下</A> </DIV>

<DIV id=pulloutViewArea>

<DIV id=pullout0Window>

<DIV id=pullout0Content>

<DIV align=center><STRONG>第一页</STRONG></DIV>

<TABLE width=275 border=0>

  <TBODY>

  <TR>

    <TD>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P></TD></TR></TBODY></TABLE></DIV></DIV>

<DIV id=pullout1Window>

<DIV id=pullout1Content>

<DIV align=center><STRONG>第二页</STRONG></DIV>

<TABLE width=275 border=0>

  <TBODY>

  <TR>

    <TD>

      <P>This is item number 1. This text is here to fill up space. This is item

      number 1. This text is here to fill up space. This is item number 1. This

      text is here to fill up space. This is item number 1. This text is here to

      fill up space.</P>

      <P>This is item number 1. This text is here to fill up space. This is item

      number 1. This text is here to fill up space. This is item number 1. This

      text is here to fill up space. This is item number 1. This text is here to

      fill up space.</P>

      <P>This is item number 1. This text is here to fill up space. This is item

      number 1. This text is here to fill up space. This is item number 1. This

      text is here to fill up space. This is item number 1. This text is here to

      fill up space.</P>

      <P>This is item number 1. This text is here to fill up space. This is item

      number 1. This text is here to fill up space. This is item number 1. This

      text is here to fill up space. This is item number 1. This text is here to

      fill up space.</P>

      <P>This is item number 1. This text is here to fill up space. This is item

      number 1. This text is here to fill up space. This is item number 1. This

      text is here to fill up space. This is item number 1. This text is here to

      fill up space.</P>

      <P>This is item number 1. This text is here to fill up space. This is item

      number 1. This text is here to fill up space. This is item number 1. This

      text is here to fill up space. This is item number 1. This text is here to

      fill up space.</P></TD></TR></TBODY></TABLE></DIV></DIV>

<DIV id=pullout2Window>

<DIV id=pullout2Content>

<DIV align=center><STRONG>第三页</STRONG></DIV>

<TABLE width=275 border=0>

  <TBODY>

  <TR>

    <TD>

      <P>This is item number 2. This text is here to fill up space. This is item

      number 2. This text is here to fill up space. This is item number 2. This

      text is here to fill up space. This is item number 2. This text is here to

      fill up space.</P>

      <P>This is item number 2. This text is here to fill up space. This is item

      number 2. This text is here to fill up space. This is item number 2. This

      text is here to fill up space. This is item number 2. This text is here to

      fill up space.</P>

      <P>This is item number 2. This text is here to fill up space. This is item

      number 2. This text is here to fill up space. This is item number 2. This

      text is here to fill up space. This is item number 2. This text is here to

      fill up space.</P>

      <P>This is item number 2. This text is here to fill up space. This is item

      number 2. This text is here to fill up space. This is item number 2. This

      text is here to fill up space. This is item number 2. This text is here to

      fill up space.</P>

      <P>This is item number 2. This text is here to fill up space. This is item

      number 2. This text is here to fill up space. This is item number 2. This

      text is here to fill up space. This is item number 2. This text is here to

      fill up space.</P>

      <P>This is item number 2. This text is here to fill up space. This is item

      number 2. This text is here to fill up space. This is item number 2. This

      text is here to fill up space. This is item number 2. This text is here to

      fill up space.</P></TD></TR></TBODY></TABLE></DIV></DIV>

<DIV id=pullout3Window>

<DIV id=pullout3Content>

<DIV align=center><STRONG>第四页</STRONG></DIV>

<TABLE width=275 border=0>

  <TBODY>

  <TR>

    <TD>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P></TD></TR></TBODY></TABLE></DIV></DIV>

<DIV id=pullout4Window>

<DIV id=pullout4Content>

<DIV align=center><STRONG>第五页</STRONG></DIV>

<TABLE width=275 border=0>

  <TBODY>

  <TR>

    <TD>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up space.</P>

      <P>This is item number 0. This text is here to fill up space. This is item

      number 0. This text is here to fill up space. This is item number 0. This

      text is here to fill up space. This is item number 0. This text is here to

      fill up

space.</P></TD></TR></TBODY></TABLE></DIV></DIV></DIV></DIV>

 

</body>

 

</html>

 

0 Comments

Mon

23

Feb

2009

49、变换各种颜色的文本

49、变换各种颜色的文本

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效--不断变换各种颜色的文本</title>

 

<body>

 

<script LANGUAGE="JavaScript1.2">

<!-- Begin

function initArray() {

this.length = initArray.arguments.length;

for (var i = 0; i < this.length; i++) {

this[i] = initArray.arguments[i];

}

}

var ctext = "欢迎光临本站";

var speed = 1000;

var x = 0;

var color = new initArray(

//改变下面的颜色。

"red",

"aqua",

"lime",

"black",

"white",

"yellow",

"#FF00FF",

"#00FFFF",

"#000000",

"#0000FF",

"#FF00FF",

"#808080",

"#008000",

"#00FF00",

"#800000",

"#000000",

"#808000",

"#800080",

"#FF0000",

"#C0C0C0",

"#008080",

"#FFFFFF",

"#FFFF00"

);

 

if(navigator.appName == "Netscape") {

document.write('<layer id="c"><center>'+ctext+'</center></layer><br>');

}

if (navigator.appVersion.indexOf("MSIE") != -1){

document.write('<div id="c"><center>'+ctext+'</center></div>');

}

function chcolor(){

if(navigator.appName == "Netscape") {

document.c.document.write('<center><font color="'+color[x]);

document.c.document.write('">'+ctext+'</font></center>');

document.c.document.close();

}

else if (navigator.appVersion.indexOf("MSIE") != -1){

document.all.c.style.color = color[x];

}

(x < color.length-1) ? x++ : x = 0;

}

setInterval("chcolor()",1000);

// End -->

</script>

 

</body>

 

</html>

 

0 Comments

Mon

23

Feb

2009

48、可以控制的公告栏

48、可以控制的公告栏

</form>

<p align="center">

       <TEXTAREA onmouseover=this.focus() style="BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 1px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; BORDER-LEFT: #000000 1px solid; PADDING-TOP: 1px; BORDER-BOTTOM: #000000 1px solid" onfocus=this.select() name=S1 rows=7 cols=66><html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效--可以控制的公告栏</title>

</head>

 

<body>

 

<script language="JavaScript">

<!-- Activate Cloaking Device

 

 

var i = 0;

// used to cycle thru messages

var TextNumber = -1;

// array of messages

var TextInput = new Object();

// used to load manipulate message

var HelpText="";

// used to load message

var Text = "";

// length of timeout (smaller is faster)

var Speed=50;

// used to display message number

var message=0;

// used to position text in ver 2.0

var addPadding="\r\n";

 

// Each element of TextInput represents a single message.

TextInput[0] = "欢迎光临网页特效";

TextInput[1] = "网站开发与维护";

TextInput[2] = "服务器的托管与租用";

TextInput[3] = "域名申请企业邮局";

TextInput[4] = "软件开发程序定制";

TextInput[5] = "网站管理系统";

TextInput[6] = "提出宝贵意见";

TextInput[7] = "再次感谢你的光临";

 

TotalTextInput = 7; // (0, 1, 2, 3, 4, 5, 6, 7)

 

// Positioning and speed vary between versions.

var Version = navigator.appVersion;

if (Version.substring(0, 1)==3)

{

Speed=200;

addPadding="";

}

 

for (var addPause = 0; addPause <= TotalTextInput; addPause++)

{TextInput[addPause]=addPadding+TextInput[addPause];}

var TimerId

var TimerSet=false;

 

// Called by >>> button (display next message) .

function nextMessage()

{

if (!TimerSet)

{

TimerSet=true;

clearTimeout (TimerId);

if (TextNumber>=TotalTextInput)

{

alert("This is the end of the list!");

TimerSet=false;

}

else

{

TextNumber+=1;

message=TextNumber+1;

document.forms[0].elements[2].value= message;

Text = TextInput[TextNumber];

HelpText = Text;

}

teletype();

}

}

 

// Gets and displays character from rollMessage() .

// Variable Speed controls length of timeout and thus the speed of typing.

function teletype()

{

if (TimerSet)

{

Text=rollMessage();

TimerId = setTimeout("teletype()", Speed);

document.forms[0].elements[0].value=Text;

}

}

 

// Pulls one character at a time from string and returns (as Text) to function teletype() for displaying.

function rollMessage ()

{

i++;

var CheckSpace = HelpText.substring(i-1, i);

CheckSpace = "" + CheckSpace;

if (CheckSpace == " ")

{i++;}

if (i >= HelpText.length+1)

{

TimerSet=false;

Text = HelpText.substring(0, i);

i=0;

return (Text);

}

Text = HelpText.substring(0, i);

return (Text);

}

// Initially called by onLoad in BODY tag to load title.

function initTeleType()

{

Text="\r\n Manual Tele-Type Display";

document.forms[0].elements[0].value=Text;

}

// Called by <<< button (get previous message).

function lastMessage()

{

if (!TimerSet && TextNumber!=-1)

{

TimerSet=true;

clearTimeout (TimerId);

if (TextNumber<=0)

{

alert("This is the beginning of the list!");

TimerSet=false;

}

else

{

TextNumber-=1;

message=TextNumber+1;

document.forms[0].elements[2].value= message;

Text = TextInput[TextNumber];

HelpText = Text;

}

teletype();

}

}

 

// Deactivate Cloaking -->

</script>

 

 

<form>

<table CELLSPACING="0" CELLPADDING="0" WIDTH="17%">

<tr>

<td width="100%" colspan="3" valign="top"><div align="center"><p><textarea NAME="teletype" ROWS="3" COLS="28" wrap="yes">

 

0 Comments

Mon

23

Feb

2009

47、又一款文字闪烁显示

47、又一款文字闪烁显示

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效---又一款文字闪烁显示</title>

 

</head>

 

<body>

 

<SCRIPT language=JavaScript>    

<!--

text = "欢迎光临网页特效__7stk.com"; //显示的文字    

color1 = "black"; //文字的颜色    

color2 = "white"; //转换的颜色    

fontsize = "3"; //字体大小    

speed = 100; //转换速度 (1000 = 1 )     

i = 0;    

if (navigator.appName == "Netscape") {    

document.write("<layer id=a visibility=show></layer><br><br><br>");    

}    

else {    

document.write("<div id=a></div>");    

}    

function changeCharColor() {    

if (navigator.appName == "Netscape") {    

document.a.document.write("<center><font face=arial ><font color=" + color1 +     

">");    

for (var j = 0; j < text.length; j++) {    

if(j == i) {    

document.a.document.write("<font face=arial color=" + color2 + ">" + Text.charAt(i) + "</font>");    

}    

else {    

document.a.document.write(text.charAt(j));    

}    

}    

document.a.document.write('</font></font></center>');    

document.a.document.close();    

}    

if (navigator.appName == "Microsoft Internet Explorer") {    

str = "<font face=arial><font color=" + color1 + ">";    

for (var j = 0; j < text.length; j++) {    

if( j == i) {    

str += "<font face=arial color=" + color2 + ">" + text.charAt(i) + "</font>";    

}    

else {    

str += text.charAt(j);    

}    

}    

str += "</font></font>";    

a.innerHTML = str;    

}    

(i == text.length) ? i=0 : i++;    

}    

setInterval("changeCharColor()", speed);    

-->    

</SCRIPT>

 

</body>

 

</html>

 

0 Comments

Mon

23

Feb

2009

46、文字动感模糊切换

46、文字动感模糊切换

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效--文字动感模糊切换效果</title>

</head>

 

<body>

 

<script>

<!-- Beginning of JavaScript -

//改变字体的大小

var thissize=20

var textfont="Verdana"

//改变字体的颜色

var textcolor= new Array()

textcolor[0]="EEEEEE"

textcolor[1]="DDDDDD"

textcolor[2]="CCCCCC"

textcolor[3]="AAAAAA"

textcolor[4]="888888"

textcolor[5]="666666"

textcolor[6]="555555"

textcolor[7]="444444"

textcolor[8]="333333"

textcolor[9]="222222"

textcolor[10]="111111"

textcolor[11]="000000"

//改变文字的内容

var message = new Array()

message[0]="欢迎光临网页特效"

message[1]="7stk.com"

message[2]="希望你喜欢这种模式"

message[3]="再次感谢你的光临"

 

var i_blurstrength=20

var i_message=0

var i_textcolor=0

 

function blurtext() {

if(document.all) {

if (i_blurstrength >=-2) {

if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}

blurthis.innerHTML="<span id='blurpit1' style='position:absolute;visibility:visible;width:600px; top:5px;left:5px;filter:blur(add=0,strength="+i_blurstrength+",direction=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_message]+"</span>";

document.close()

i_blurstrength=i_blurstrength-2

i_textcolor++

var timer=setTimeout("blurtext()",50)

}

 

else {

if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}

blurthis.innerHTML="<span id='blurit1' style='position:absolute;visibility:visible;width:600px; top:5px;left:5px;filter:blendTrans(duration=4.2);font-family:"+textfont+";font-size:"+thissize+"pt;color:FF0000'>"+message[i_message]+"</span>";

i_message++

if (i_message>=message.length){i_message=0}

 

i_blurstrength=20

i_textcolor=0

clearTimeout(timer)

var timer=setTimeout("blurtext()",2000)

}

}

}

window.onload=blurtext

// - End of JavaScript - -->

</script>

<div id=mainbod

style="LEFT: 10px; VISIBILITY: visible; POSITION: absolute; TOP: 180px"></div>

<div id=blurthis

style="VISIBILITY: visible; POSITION: absolute"></div>

 

</body>

 

</html>

 

0 Comments

Mon

23

Feb

2009

45、上下跳动的 文本代码

45、上下跳动的 文本代码

<html>

<head>

<title>网页特效--上下跳动的文本</title>

</head><body>

 

 

<script language="JavaScript">

<!--

done = 0;

step = 4

function anim(yp,yk)

{

 if(document.layers) document.layers["napis"].top=yp;

 else  document.all["napis"].style.top=yp;

 

 if(yp>yk) step = -4

 if(yp<60) step = 4

 

 setTimeout('anim('+(yp+step)+','+yk+')', 10);

}

function start()

{

 if(done) return

 done = 1;

 

 if(navigator.appName=="Netscape") {

  document.napis.left=innerWidth/2 - 145;

  anim(60,innerHeight - 60)

 }

 else {

  napis.style.left=280;

  anim(60,document.body.offsetHeight - 60)

 }

 

}

 

//-->

</script>

<div id="napis"

style="position: absolute; top: 159px; width: 400px; height: 78px; left: 215px"><font size="5">

  <font face="华文行楷">网页特效</font><b>

</b></font></div>

<script language="JavaScript">

<!--

 setTimeout('start()',10);

//-->

</script>

</body></html>

 

0 Comments

Mon

23

Feb

2009

44、荧光灯效果的文字

44、荧光灯效果的文字

<html>

<head>

<title>网页特效---荧光灯效果的文字</title>

</head><body bgcolor="#000000">

<!--将以下代码加入HTML<Body></Body>之间-->

 

<script language="JavaScript1.2">

 

var message="网页特效___网页特效"

var neonbasecolor="0000FF"

var neontextcolor="FF0000"

var flashspeed=100

 

var n=0

if (document.all){

document.write('<font color="'+neonbasecolor+'">')

for (m=0;m<message.length;m++)

document.write('<span id="neonlight">'+message.charAt(m)+'</span>')

document.write('</font>')

 

var tempref=document.all.neonlight

}

else

document.write(message)

 

function neon(){

 

//Change all letters to base color

if (n==0){

for (m=0;m<message.length;m++)

tempref[m].style.color=neonbasecolor

}

 

//cycle through and change individual letters to neon color

tempref[n].style.color=neontextcolor

 

if (n<tempref.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",1500)

return

}

}

 

function beginneon(){

if (document.all)

flashing=setInterval("neon()",flashspeed)

}

beginneon()

 

 

</script>

</body></html>

 

0 Comments

Mon

23

Feb

2009

43、一个彩虹文字代码

43、一个彩虹文字代码

<html>

 

<head>

<title>网页特效---彩虹文字</title>

<meta content="text/html; charset=gb2312" http-equiv="Content-Type">

<script language="JavaScript">

<!-- Hide the script from old browsers --

 

function MakeArray(n){

   this.length=n;

   for(var i=1; i<=n; i++) this[i]=i-1;

   return this

}

 

hex=new MakeArray(16);

hex[11]="A"; hex[12]="B"; hex[13]="C"; hex[14]="D"; hex[15]="E"; hex[16]="F";

 

function ToHex(x){              // Changes a int to hex (in the range 0 to 255)

   var high=x/16;

   var s=high+"";               //1

   s=s.substring(0,2);          //2 the combination of these are the same as the trunc function

   high=parseInt(s,10);         //3

   var left=hex[high+1];        // left part of the hex-value

   var low=x-high*16;           // calculate the rest of the values

   s=low+"";                    //1

   s=s.substring(0,2);          //2 the combination of these are the same as the trunc function

   low=parseInt(s,10);          //3

   var right=hex[low+1];        // right part of the hex-value

   var string=left+""+right;    // add the high and low together

   return string;

}

 

function rainbow(text){

   text=text.substring(3,text.length-4);        // gets rid of the HTML-comment-tags

   color_d1=255;                                // any value in 'begin' 0 to 255

   mul=color_d1/text.length;

   for(i=0;i<text.length;i++){

      color_d1=255*Math.sin(i/(text.length/3)); // some other things you can try>> "=255-mul*i" to fade out, "=mul*i" to fade in, or try "255*Math.sin(i/(text.length/3))"

      color_h1=ToHex(color_d1);

      color_d2=mul*i;

      color_h2=ToHex(color_d2);

      document.write("<FONT COLOR='#FF"+color_h1+color_h2+"'>"+text.substring(i,i+1)+'</FONT>');

   }

}

 

// --End Hiding Here -->

</script>

 

<meta content="Microsoft FrontPage 6.0" name="GENERATOR">

</head>

 

<body bgColor="#000000" text="#FFFFFF">

<font size="+2">

 

<p align="center"></font><strong><big><big><font color="#ff8000" face="幼圆">彩虹文字——文本渐变色</font></big></big></strong></p>

 

<script language="JavaScript"><!--

   {rainbow("-->请看这个例子:青山不语……在季节背后,你独守那一片梦的海洋,执著地等待……任凭心的潮水,冲刷记忆的围栏……<!__");}

// --></script>

 

 

<p> </p>

 

<div align="center">

  <center>

 

<table width="88%">

  <tr>

    <td width="73%"> </td>

  </tr>

  <tr>

    <td width="73%"><font face="幼圆" size="3" color="#00FFFF">    </font>

      <p><font face="幼圆" size="3" color="#00FFFF">  </font><font color="#00FF00"><font face="幼圆" size="3">

      </font>请看上面这个例子,<font face="幼圆" size="3">一段文本,颜色均匀过渡,如同天空中雨后的彩虹,横过屏幕,十分赏心悦目,这种文本颜色均匀过渡的效果,你可能在photoshop等图形编辑软件里用到过,但现在,你也可以用到网页上了!</font>比起简单的文字,是不是更具煽情性</font><font color="#00FF00"></font></p>

    </td>

  </tr>

</table>

 

  </center>

</div>

 

<div align="center">

  <center>

  <table border="0" width="100%">

    <tr>

      <td width="50%"></td>

      <td width="50%"></td>

    </tr>

    <tr>

      <td width="50%"></td>

      <td width="50%"></td>

    </tr>

  </table>

  </center>

</div>

</body>

</html>

 

0 Comments

Mon

23

Feb

2009

42、一个旋转文字代码

42、一个旋转文字代码

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

 

<title>网页特效---旋转文字</title>

</head>

 

<body>

 

 

<BODY onload=setVariables(),moveLetters() vLink=#0000FF background="../images/bg.gif">

<SCRIPT language=JavaScript>

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>a</FONT></DIV>

<DIV id=object1

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

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

<DIV id=object2

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

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

<DIV id=object3

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

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

<DIV id=object4

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

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

<DIV id=object5

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

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

<DIV id=object6

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

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

<DIV id=object7

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

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

<DIV id=object8

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

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

<DIV id=object9

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

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

<DIV id=object10

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

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

<DIV id=object11

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

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

<DIV id=object12

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

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

<DIV id=object13

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

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

<DIV id=object14

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

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

<DIV id=object15

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

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

<DIV id=object16

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

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

<DIV id=object17

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

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

<DIV id=object18

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

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

<DIV id=object19

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

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

<DIV id=object20

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

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

<DIV id=object21

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

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

<DIV id=object22

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

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

<DIV id=object23

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

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

<DIV id=object24

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

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

<DIV id=object25

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

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

 

</body>

 

</html>

 

0 Comments

Mon

23

Feb

2009

41、边框碰撞的文字

41、边框碰撞的文字

<html>

 

<head>

<title>网页特效---在屏幕内沿边框碰撞的文字</title>

<meta content="text/html; charset=gb2312" http-equiv="Content-Type">

</head>

 

<body onload="setValues()">

<script>

<!-- Beginning of JavaScript -

var your_message="欢迎学习网页特效制作!"

var textfont="Verdana"

var textsize=20

var textcolor="ff0000"

var textboldness=7

var tempo=40

var stepx=30

var stepy=20

var msg=new Array()

var msg=your_message

var message=msg.split("")

var numberofletters=msg.length-1

var x,y

var marginbottom

var marginleft=0

var margintop=0

var marginright

textboldness=textboldness*100

var timer

var xpos=new Array()

var ypos=new Array()

var spancontent=new Array()

 

for (i=0; i<=numberofletters;i++) {

    xpos[i]=0

       ypos[i]=0

}

 

for (i=0;i<=numberofletters;i++) {

       spancontent[i]="<span style='position:relative;font-family:"+textfont+";font-size:"+textsize+"pt;color:"+textcolor+";font-weight:"+textboldness+"'>"+message[i]+"</span>"

}

 

function setValues() {

    var firsttimer= setTimeout("setValues2()",2000)

}

 

function setValues2() {

       if (document.all) {

           marginbottom = document.body.clientHeight-5

           marginright = document.body.clientWidth-5

              for (i=0;i<=numberofletters;i++) {            

                     var thisspan = eval("document.all.span"+i)

                  thisspan.innerHTML=spancontent[i]

                     var thisspan = eval("document.all.span"+(i)+".style")

             thisspan.posLeft=0

                     thisspan.postop=0 

              }

              moveball()

       }

      

       if (document.layers) {

           marginbottom = window.innerHeight-10

           marginright = window.innerWidth-10

              for (i=0;i<=numberofletters;i++) {            

                     var thisspan=eval("document.span"+i+".document")

                  thisspan.write(spancontent[i])

                     thisspan.close()

                     var thisspan=eval("document.span"+i)

             thisspan.left=0

                     thisspan.top=0 

              }

           moveball()

       }

}

 

function randommaker(range) {          

       rand=Math.floor(range*Math.random())

    return rand

}

 

function moveball() {

       if (document.all) {

              checkposition()

            makesnake()

            document.all.span0.style.posTop+=stepy

           timer=setTimeout("moveball()",tempo)

       }

       if (document.layers) {

              checkposition()

            makesnake()

            document.span0.top+=stepy

           timer=setTimeout("moveball()",tempo)

       }

}

 

function makesnake() {

              for (i=numberofletters; i>=1; i--) {

                   xpos[i]=xpos[i-1]

                     ypos[i]=ypos[i-1]

           }

              if (document.all) {

                     xpos[0]=document.all.span0.style.posLeft+stepx

                     ypos[0]=document.all.span0.style.posTop+stepy

                     for (i=0;i<=numberofletters;i++) { 

                         var thisspan=eval("document.all.span"+(i)+".style")

                         thisspan.posLeft=xpos[i]

                            thisspan.posTop=ypos[i]

                  }

              }

              if (document.layers) {

                     xpos[0]=document.span0.left+stepx

                     ypos[0]=document.span0.top+stepy

                     for (i=0;i<=numberofletters;i++) { 

                         var thisspan = eval("document.span"+i)

                         thisspan.left=xpos[i]

                            thisspan.top=ypos[i]

                  }

              }

}

 

function checkposition() {

       if (document.all) {

              if (document.all.span0.style.posLeft>marginright) {

                     stepx=(stepx+randommaker(2))*-1

                     document.all.span0.style.posLeft-=1

              }

              if (document.all.span0.style.posLeft<marginleft) {

                     stepx=(stepx+randommaker(2))*-1

                     document.all.span0.style.posLeft+=1

              }    

              if (document.all.span0.style.posTop>marginbottom) {

                     stepy=(stepy+randommaker(2))*-1

                     document.all.span0.style.posTop-=1

              }

              if (document.all.span0.style.posTop<margintop) {

                     stepy=(stepy+randommaker(2))*-1

                     document.all.span0.style.posTop+=1

              }

       }

       if (document.layers) {

              if (document.span0.left>=marginright) {

                     stepx=(stepx+randommaker(2))*-1

                     document.span0.left-=10

              }

              if (document.span0.left<=marginleft) {

                     stepx=(stepx+randommaker(2))*-1

                     document.span0.left+=10

              }    

              if (document.span0.top>=marginbottom) {

                     stepy=(stepy+randommaker(2))*-1

                     document.span0.top-=10

              }

              if (document.span0.top<=margintop) {

                     stepy=(stepy+randommaker(2))*-1

                     document.span0.top+=10

              }

       }

}

// - End of JavaScript - -->

</script>

<script>

<!-- Beginning of JavaScript -

 

for (i=0;i<=numberofletters;i++) {

    document.write("<span id='span"+i+"' style='position:absolute'></span>")

    document.close()

}

 

// - End of JavaScript - -->

</script>

 

</body>

</html>

 

0 Comments

Mon

23

Feb

2009

40、动态波浪效果的文字

40、动态波浪效果的文字

<html>

 

<head>

<title>网页特效---动态波浪效果的文字</title>

 

</head>

 

<body onload="if (document.all)test()">

<script language="javascript">

<!--

if (document.layers)

 {

 alert("Your Browser is not capable of displaying this effect.\nPick another.");

 opener.gO();window.close();

 }

else

if (document.all){

var step=3;

var xstep=0;

var msg='★欢迎光临我的主页!!';

document.write("<center><div id='water' style='position:relative;width:450px;height:100px;font-family:Verdana;font-size:40px;color:#ff0000'>"+msg+"</div></center>");

function test(){

document.all.water.style.filter='wave(freq=3, strength=10, phase='+xstep+', lightstrength=45, add=0, enabled=1)';

xstep+=step;

TIMER=setTimeout('test()',10);

}

}

//-->

</script>

 

</body>

</html>

 

0 Comments

Mon

23

Feb

2009

39、轮流冲向屏幕的文字

39、轮流冲向屏幕的文字

<html>

 

<head>

<title>网页特效-轮流冲向屏幕的文字</title>

</head>

 

<body>

<font face="楷体_GB2312" color="#ff3333"><script language="JavaScript"><!-- Begin

var speed = 20;

var cycledelay = 10000;

var maxsize = 48;

 

var x = 0;

var y = 0;

var themessage, size;

var esize = "";

 

function initArray() {

this.length = initArray.arguments.length;

for (var i = 0; i < this.length; i++) {

this[i] = initArray.arguments[i];

   }

}

var themessage2 = new initArray(

"欢迎学习网页特效制作!!",

"这里资源多多,不停更新!",

"网页特效脚本让您的网页多姿多彩!",

"再次感谢您的到来!"

);

if(navigator.appName == "Netscape")

document.write('<layer id="wds"></layer><br>');

if (navigator.appVersion.indexOf("MSIE") != -1)

document.write('<span id="wds"></span><br>');

function upwords(){

themessage = themessage2[y];

if (x < maxsize) {

x++;

setTimeout("upwords()",speed);

}

else setTimeout("downwords()",cycledelay);

 

if(navigator.appName == "Netscape") {

size = "<font point-size='"+x+"pt'>";

document.wds.document.write(size+"<center>"+themessage+"</center>"+esize);

document.wds.document.close();

}

if (navigator.appVersion.indexOf("MSIE") != -1){

wds.innerHTML = "<center>"+themessage+"</center>";

wds.style.fontSize=x+'px'

   }

}

function downwords(){

if (x > 1) {

x--;

setTimeout("downwords()",speed);

}

else {

setTimeout("upwords()",cycledelay);

y++;

if (y > themessage2.length - 1) y = 0;

}

if(navigator.appName == "Netscape") {

size = "<font point-size='"+x+"pt'>";

document.wds.document.write(size+"<center>"+themessage+"</center>"+esize);

document.wds.document.close();

}

if (navigator.appVersion.indexOf("MSIE") != -1){

wds.innerHTML = "<center>"+themessage+"</center>";

wds.style.fontSize=x+'px'

   }

}

setTimeout("upwords()",speed);

//  End -->

</script>

</font>

<div align="center">

  <center>

  <table border="0" width="100%" height="54">

    <tr>

      <td width="100%" height="18">

        <p class="MsoNormal" align="center"> </p>

        <p class="MsoNormal" align="center"> </p>

        <p class="MsoNormal" align="center"><font color="#FF0000" size="5"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-hansi-font-family: Times New Roman"><b>轮流冲向屏幕的文字</b></span></font><span lang="EN-US" style="font-size:15.0pt;mso-bidi-font-size:

10.0pt"><o:p>

        </o:p>

        </span></p>

        <p align="left"><span lang="EN-US" style="font-size: 10.5pt; mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-spacerun: yes">   

        </span></td>

    </tr>

    <tr>

      <td width="100%" height="1">

      <p class="MsoNormal" align="left"><font color="#FF00FF"><span lang="EN-US" style="font-size: 10.5pt; mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"> 

      一行行文字由小变大,又由大变小,</span><span style="font-size:10.5pt;mso-bidi-font-size:10.0pt;font-family:宋体;mso-ascii-font-family:

"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:

"Times New Roman";mso-font-kerning:1.0pt;mso-ansi-language:EN-US;mso-fareast-language:

ZH-CN;mso-bidi-language:AR-SA">冲向屏幕</span><span lang="EN-US" style="font-size:

10.5pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";mso-fareast-font-family:

宋体;mso-font-kerning:1.0pt;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;

mso-bidi-language:AR-SA">,</span><span style="font-size: 10.5pt; mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">并轮流变化内容,还可以加上超链接,形成十分“酷”的动态导航菜单<span lang="EN-US"></span></span></font><font color="#FF0000"><span style="mso-spacerun: yes; font-size: 15.0pt; mso-bidi-font-size: 10.0pt"> </span></font></p>

      <center>

      <p> </td>

    </center>

    </tr>

  </table>

  </center>

</div>

</body>

</html>

 

0 Comments

Mon

23

Feb

2009

38、水波式切换动态文字

38、水波式切换动态文字

<html>

 

<head>

<title>网页特效---水波式切换动态文字</title>

<meta content="text/html; charset=gb2312" http-equiv="Content-Type">

</head>

 

<body bgColor="#000000" onload="initiate()">

<script language="JavaScript">

<!-- Beginning of JavaScript -

// Your messages. Add as many as you like

var message=new Array()

message[0]="欢迎学习网页特效制作,网页制作从此轻松!"

message[1]="这里有网页特效,免费资源,网页素材,教程!"

message[2]="网页tt,网缘无限,请进社区!"

 

// the URLs of your messages

var messageurl=new Array()

messageurl[0]="http://7stk.com"

messageurl[1]="http://7stk.com"

messageurl[2]="http://7stk.com"

 

// the targets of the links

// accepted values are '_blank' or '_top' or '_parent' or '_self'

// or the name of your target-window (for instance 'main')

var messagetarget=new Array()

messagetarget[0]="_blank"

messagetarget[1]="_blank"

messagetarget[2]="_blank"

 

// the text of your links. In this sample it's the word 'more'

var linktext="去看看"

// font-size

var fntsize=11

 

// font-color

var fntcolor="FFFF00"

 

// font-family

var fntfamily="Verdana"

 

// font-weight: 1 means bold, 0 means normal

var fntweight=0

 

// standstill of each image(seconds)

var pause=3

 

var backgroundcolor="444444"

 

// horizontal position of the slideshow (distance to the left margin of the browser-window, pixels)

var posleft=5

 

// vertical position of the slideshow (distance to the top margin of the browser-window, pixels)

var postop=5

 

// width of the textbox (pixels)

var scrollerwidth=200

 

// height of the textbox (pixels)

var scrollerheight=150

 

// width of the border (pixels)

var scrollerborder=2

 

// width of the textpadding (pixels)

var textpadding=15

 

// do not edit the variables below

var textwidth=scrollerwidth-(2*textpadding)

var textcontent=""

var bgcontent=""

var i_message=0

var i_stepwave=0

var i_maxstepwave=20

pause=pause*1000

if (fntweight==1) {fntweight="700"}

else {fntweight="100"}

 

function initiate() {

gettextcontent()

getbgcontent()

if (document.all) {

wavemessage.innerHTML=textcontent

wavemessagebg.innerHTML=bgcontent

wavemessagebg.style.posLeft=posleft

wavemessagebg.style.posTop=postop

wavemessage.style.posLeft=posleft+textpadding

wavemessage.style.posTop=postop+textpadding

enlargewave()

}

if (document.layers) {

document.wavemessage.left=posleft+textpadding

document.wavemessage.top=postop+textpadding

document.wavemessagebg.document.write(bgcontent)

document.wavemessagebg.document.close()

document.wavemessagebg.left=posleft

document.wavemessagebg.top=postop

changemessage()

}

}

 

function enlargewave() {

if (i_stepwave<=i_maxstepwave) {

wavemessage.filters.wave.phase=i_stepwave

wavemessage.filters.wave.strength=i_stepwave

wavemessage.filters.wave.lightstrength=i_stepwave

wavemessage.filters.wave.freq=i_stepwave

i_stepwave++

var timer=setTimeout("enlargewave()",50)

}

else {

clearTimeout(timer)

changemessage()

}

}

 

function reducewave() {

if (i_stepwave>0) {

wavemessage.filters.wave.phase=i_stepwave

wavemessage.filters.wave.strength=i_stepwave

wavemessage.filters.wave.lightstrength=i_stepwave

wavemessage.filters.wave.freq=i_stepwave

i_stepwave--

var timer=setTimeout("reducewave()",50)

}

else {

clearTimeout(timer)

var timer=setTimeout("enlargewave()",pause)

}

}

 

function changemessage() {

i_message++

if (i_message>=message.length) {i_message=0}

gettextcontent()

 

if (document.all) {

wavemessage.innerHTML=textcontent

reducewave()

}

 

if (document.layers) {

document.wavemessage.document.write(textcontent)

document.wavemessage.document.close()

var timer=setTimeout("changemessage()",pause)

}

 

}

 

function gettextcontent() {

textcontent="<span style='font-size:"+fntsize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+";width:"+textwidth+"px'>"

textcontent+="<font color="+fntcolor+">"+message[i_message]+"</font> "

textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">"

textcontent+="<br><br><font color="+fntcolor+">"+linktext+"</font></a></span>"

}

 

function getbgcontent() {

bgcontent="<table width="+scrollerwidth+" height="+scrollerheight+" border="+scrollerborder+"><tr><td bgcolor="+backgroundcolor+">&nbsp;</td></tr></table>"

}

 

// - End of JavaScript - -->

</script>

<div id="wavemessagebg" style="POSITION: absolute"></div><div

id="wavemessage" style="FILTER: wave(); POSITION: absolute"></div><div

id="deletethisblock" style="LEFT: 220px; POSITION: absolute; TOP: 5px"></div>

 

</body>

</html>

 

0 Comments

Mon

23

Feb

2009

37、围绕一点旋转的文字

37、围绕一点旋转的文字

<HTML><HEAD><TITLE>网页特效--围绕一点旋转的文字效果</TITLE>

<META content="text/html; charset=gb2312" http-equiv=Content-Type></HEAD>

<BODY onload=initiate() text="#FF0000">

<CENTER>

<SCRIPT>

<!--

 

var message = new Array()

message[0]="欢迎光临网页特效!"

message[1]="怎么样,有什么感觉?"

message[2]="是不是感觉比较酷呢?:)"

message[3]="请记住本站的网址!"

 

// 旋转信息的宽与高

var scrollerheight=200

var scrollerwidth=700

 

// 字体

var font_family="宋体"

 

// 文本的位置

var x_textposition=300

var y_textposition=100

 

var i_message=0

var i_loop=0

var max_loop=48

var timer

y_textposition=y_textposition-Math.floor(scrollerheight/1.5)+10

x_textposition=x_textposition-Math.floor(scrollerwidth/3)

 

function initiate() {

       if (document.all) {       

              document.all.rotationstyle.style.posLeft=x_textposition

              document.all.rotationstyle.style.posTop=y_textposition

        changemessage()

       }

}

 

function changemessage() {

              do_rotate="yes"

              rotationstyle.innerHTML=

              '<OBJECT ID="rotationobj" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+

        '<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+

        '<PARAM NAME="Line0002" VALUE="SetLineColor(ff,00,00)">'+

              '<PARAM NAME="Line0003" VALUE="SetFillColor(ff,00,00)">'+

              '<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+5+', 400, 0, 0, 0)">'+

              '<PARAM NAME="Line0005" VALUE="Text(\''+message[i_message]+'\', 0, 0, 0)">'+

              '</OBJECT>'        

              startscroll()

}

 

function startscroll() {

       if (i_loop < max_loop) {

        rotationobj.Rotate(0,0,-30)

              rotationobj.Scale(1.04,1.04,1.04)

              i_loop++

              timer=setTimeout("startscroll()",50)

       }

   else {

        i_message++

              i_loop=0

        if (i_message>=message.length) {i_message=0}

              timer=setTimeout("changemessage()",2000)

       }

}

 

// -->

</SCRIPT>

<SPAN id=rotationstyle style="POSITION: absolute">

<OBJECT classid=CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6

id=rotationobj></OBJECT></SPAN>

</BODY></HTML>

 

0 Comments

Mon

23

Feb

2009

36、绚丽多彩的 文字代码

36、绚丽多彩的 文字代码

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80">

<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<title>网页特效---绚丽多彩的文字</title>

</head>

 

<body bgcolor="#000000" text="#000000">

 

<p align="center"><font id="me1" face="文鼎水管体" size="7" color="#FFFF00"><b>绚丽多彩的文字!</b></font>

 

<script language="vbscript">  

dim i  

i=1  

sub change()  

window.clearTimeout(my)  

select case i  

 case 1  

  me1.style.color="red"  

  i=2  

 case 2  

  me1.style.color="blue"  

  i=3  

 case 3  

  me1.style.color="yellow"    

  i=1  

end select  

my=window.setTimeout("change()",200)  

end sub  

  

sub window_onload()  

  

my=window.setTimeout("change()",100)  

end sub  

</script>

</body>

</html>

 

0 Comments

Mon

23

Feb

2009

35、文字古怪的蜿蜒爬行

35、文字古怪的蜿蜒爬行

<HTML><HEAD><TITLE>网页特效---文字古怪的蜿蜒爬行</TITLE>

<META content="text/html; charset=gb2312" http-equiv=Content-Type>

</HEAD>

<BODY onload=changemessage()>

<CENTER>

<SCRIPT>

<!-- Beginning of JavaScript -

 

// http://oke.yeah.net

// 下面为可更改信息

 

var mes = new Array()

mes[0]="欢迎光临 网页特效! "

mes[1]="这里收集了大量有趣的特效脚本! "

mes[2]="请大家相互转告本站的网址。 "

mes[3]="希望在这里你能找到你喜欢的网页特效 "

mes[4]="再次欢迎你的光临! "

 

var maxtextlength=30

// 下以为路线,中间不能有空格

var path= new Array(548,316,581,296,598,257,577,215,559,202,503,193,464,203,446,222,448,255,468,274,500,280,526,267,541,237,537,209,526,187,499,161,462,146,412,133,368,129,326,132,293,142,272,159,250,184,239,204,234,213,226,230,201,253,186,259,165,265,136,268,110,270,83,267,58,260,36,243,26,229,22,210,24,191,29,174,39,163,56,154,76,150,96,149,110,148,135,152,165,156,196,165,208,172,231,181,254,192,280,203,305,210,339,210,366,206,389,195,405,182,419,167,428,148,442,116,448,80,443,41,401,8,347,0,300,11,280,30,256,50,230,58,198,61,169,56,141,50,113,45,87,36,70,29,52,24,28,18,7,15)

 

// 第二个信息间隔多久出现

var stoptime=1

 

// 字体的属性

var textfont="宋体"

var textsize=12

var textcolor="ff0000"

 

// 字符的间距,如果你改变字体的大小也要改变这里

var letterspace=12

 

var tickerleft=path[path.length-2]

var tickertop=path[path.length-1]

var timer

var finalxpos=tickerleft

var i_mes=0

var message=""

var i_path=0

var stoptimemilli=stoptime*stoptime+1000

var pathx= new Array()

 

if (document.layers) {

       if (textsize>20) {textsize=6}

       else if (textsize>20) {textsize=5}

       else if (textsize>14) {textsize=4}

       else if (textsize>10) {textsize=3}

       else if (textsize>8) {textsize=2}

       else if (textsize<=7) {textsize=1}

}

 

var ii=0

for (i=0;i<=path.length-1;i=i+2) {

       pathx[ii]=path[i]

       ii++

}

 

ii=0

 

var pathy= new Array()

for (i=1;i<=path.length-1;i=i+2) {

       pathy[ii]=path[i]

       ii++

}

 

var xpos=new Array()

for (i=0;i<=maxtextlength;i++) {

       xpos[i]=5000

}

 

var ypos=new Array()

for (i=0;i<=maxtextlength;i++) {

       ypos[i]=5000

}

 

function makesnake() {

       if (i_path<=pathx.length-1) {

              for (i=message.length-1; i>=1; i--) {

                   xpos[i]=xpos[i-1]

                     ypos[i]=ypos[i-1]

           }

              xpos[0]=pathx[i_path]

              ypos[0]=pathy[i_path]

              if (document.all) {

                     for (i=0; i<message.length-1; i++) {

                         var thisspan = eval("document.all.span"+(i)+".style")

                         thisspan.posLeft=xpos[i]

                            thisspan.posTop=ypos[i]

                  }

              }

              if (document.layers) {

                     for (i=0; i<message.length-1; i++) {

                         var thisspan = eval("document.span"+i)

                         thisspan.left=xpos[i]

                            thisspan.top=ypos[i]

                  }

              }

              i_path++

              timer=setTimeout("makesnake()",20)

       }

       else {

              clearTimeout(timer)

              endposition()

       }

}

 

function endposition() {

              if (document.all) {

                     for (i=0; i<message.length-1; i++) {

                         var thisspan = eval("document.all.span"+(i)+".style")

                         thisspan.posLeft=tickerleft+finalxpos

                            thisspan.posTop=tickertop

                            finalxpos+=letterspace

                  }

              }

              if (document.layers) {

                     for (i=0; i<message.length-1; i++) {

                         var thisspan = eval("document.span"+i)

                         thisspan.left=tickerleft+finalxpos

                            thisspan.top=tickertop

                            finalxpos+=letterspace

                  }

              }

              timer=setTimeout("clearmessage()",stoptimemilli)

}

 

function clearmessage() {

              finalxpos=tickertop

              i_path=0

              for (i=0;i<=maxtextlength;i++) {

                     xpos[i]=5000

              }

              if (document.all) {

                     for (i=0;i<=maxtextlength;i++) {

                            var thisspan = eval("document.all.span"+i)

                         thisspan.innerHTML=" "

                            var thisspan = eval("document.all.span"+(i)+".style")

                         thisspan.posLeft=xpos[i]=5000

                     }

              }

              if (document.layers) {

                     for (i=0;i<=maxtextlength;i++) {

                            var thisspan = eval("document.span"+i+".document")

                         thisspan.write("<p> </p>")

                            thisspan.clear()

                            thisspan = eval("document.span"+i)

                         thisspan.left=5000

                     }

              }

              timer=setTimeout("changemessage()",2000)

}

 

function changemessage() {

              var messa=mes[i_mes]

              message=messa.split("")

              if (document.all) {

                     for (i=0;i<=message.length-1;i++) {

                            var thisspan = eval("document.all.span"+i)

                         thisspan.innerHTML="<p style='font-family:"+textfont+";font-size:"+textsize+";color:"+textcolor+"'>"+message[i]+"</p>"

                     }

              }

              if (document.layers) {

                     for (i=0; i<message.length-1; i++) {

                         var thisspan=eval("document.span"+i+".document")

                         thisspan.write("<p><font size="+textsize+" color="+textcolor+" face="+textfont+">"+message[i]+"</font></p>")

                            thisspan.clear()

                  }

              }

              i_mes++

              if (i_mes>=mes.length) {i_mes=0}

              finalxpos=tickertop

              i_path=0

              timer=setTimeout("makesnake()",1000)

}

 

// - End of JavaScript - -->

</SCRIPT>

 

<STYLE>.spanstyle {

       LEFT: 5000px; POSITION: absolute; VISIBILITY: visible

}

</STYLE>

 

<SCRIPT>

<!-- Beginning of JavaScript -

       for (i=0;i<=maxtextlength;i++) {

           document.write("<span id='span"+i+"' class='spanstyle'>")

              document.write(message)

           document.write("</span>")

       }

 

// - End of JavaScript - -->

</SCRIPT>

 

</CENTER>

</BODY>

</HTML>

 

0 Comments

Mon

23

Feb

2009

34、文字变色逐个出现

34、文字变色逐个出现

<html>

<head>

<title>网页特效-文字变色逐个出现</title>

<style type="text/css">

<!--

body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}

A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }

 A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }

a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

 

.child {display:none}-->

</style>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

</head>

 

<body onload=init()>

<br>

<br>

<center><font color=red face="隶书" size=6>文字变色逐个出现</font></center>

<br>

<center>

<table border=1 bordercolor=#000000 borderlight=green style="border-collapse: collapse" cellpadding="0" cellspacing="0">

<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>下面为效果显示区!</strong></font></td></tr>

<tr><td align=center><script language=javascript>

var layers =document.layers,style=document.all,both=layers||style,idme=908601;

if(layers){layerRef='document.layers';styleRef ='';}if(style){layerRef='document.all';styleRef =

'.style';}

function writeOnText(obj,str){

if(layers)with(document[obj]){ document.open();document.write(str);document.close();}

if(style)eval(obj+'.innerHTML=str');   }

var dispStr=new Array("欢迎光临javascript特效站!!!");

var overMe=0;

function txtTyper(str,idx,idObj,spObj,clr1,clr2,delay,plysnd){

var tmp0=tmp1= '',skip=100;

if (both && idx<=str.length) {

if (str.charAt(idx)=='<'){ while(str.charAt(idx)!='>') idx++;idx++;}

if (str.charAt(idx)=='&'&&str.charAt(idx+1)!=' '){ while (str.charAt(idx)!= ';')idx++;idx++;}

tmp0 = str.slice(0,idx);

tmp1 = str.charAt(idx++);

if (overMe==0 && plysnd==1){

if (navigator.plugins[0]){

if(navigator.plugins["LiveAudio"][0].type=="audio/basic" && navigator.javaEnabled()){document.embeds

[0].stop();

setTimeout("document.embeds[0].play(false)",100);}

} else if (document.all){

ding.Stop();

setTimeout("ding.Run()",100);}

overMe=1;}else overMe=0;

writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2

+"'>"+tmp1+"</font></span>");

setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay);}}

function init(){txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', 'red', '#99FF33', 300, 0);}

  </script>

 

<DIV class=ttl1 id=ttl0></DIV>

</td></tr>

</table></center>

<br>

<br>

<center>

 <SCRIPT LANGUAGE="JavaScript">

 

<!-- hide

 

function goHist(a)

 

{

 

   history.go(a);

 

}

 

//-->

 

</script></center>

<br>

<br>

</body>

</html>

 

1 Comments

Mon

23

Feb

2009

33、文字段到处飞舞

33、文字段到处飞舞

<SCRIPT>

 

function morph(e,wait,steps,style,done){

       if(e.morphing){

              return;

       }

       e.morphing = true;

       e.step = 0;

       e.done = steps;

       e.wait = wait;

       e.morphDone = done;

 

       // initialize the given element for the process

       // save some temporary variables within it

       var attribs = _eat_attrib(style);

       if(attribs["top"] != null){

              e.deltaTop = Math.round(Number((attribs["top"] - e.style.posTop) / steps));

              e.finalTop = attribs["top"];

       }else{

              e.deltaTop = null;

              e.finalTop = e.style.posTop;

       }

       if(attribs["left"] != null){

              e.deltaLeft = Math.round(Number((attribs["left"] - e.style.posLeft) / steps));

              e.finalLeft = attribs["left"];

       }else{

              e.deltaLeft = null;

              e.finalLeft = e.style.posLeft;

       }

       if(attribs["height"] != null){

              e.deltaHeight = Math.round(Number((attribs["height"] - e.style.posHeight) / steps));

              e.finalHeight = attribs["height"];

       }else{

              e.deltaHeight = null;

              e.finalHeight = e.style.posHeight;

       }

       if(attribs["width"] != null){

              e.deltaWidth = Math.round(Number((attribs["width"] - e.style.posWidth) / steps));

              e.finalWidth = attribs["width"];

       }else{

              e.deltaWidth = null;

              e.finalWidth = e.style.posWidth;

       }

 

       // group all of the coloring elements together

       e.colors = new Array();

       for(attrib in attribs){

              // check each one individually to kludge

              // if we need to use a "safe" name for the css attribute

              if(attrib == "background"){

                            e.colors[e.colors.length] = new Array();

                            e.colors[e.colors.length - 1].name = attrib;

                            e.colors[e.colors.length - 1].safename = attrib;

              }

              if(attrib == "color"){

                            e.colors[e.colors.length] = new Array();

                            e.colors[e.colors.length - 1].name = attrib;

                            e.colors[e.colors.length - 1].safename = attrib;

              }

              if(attrib == "border-color"){

                            e.colors[e.colors.length] = new Array();

                            e.colors[e.colors.length - 1].name = attrib;

                            e.colors[e.colors.length - 1].safename = "borderColor";

              }

       }

       for(var i=0;i<e.colors.length;i++){

              var rgb = _eat_rgb(attribs[e.colors[i].name]);

              var prergb = _eat_rgb(e.style[e.colors[i].safename]);

              e.colors[i].delta = _eat_rgb(attribs[e.colors[i].name]);

              e.colors[i].finish = _eat_rgb(attribs[e.colors[i].name]);

              e.colors[i].delta["red"] = Math.round(Number((rgb["red"] - prergb["red"]) / steps));

              e.colors[i].delta["green"] = Math.round(Number((rgb["green"] - prergb["green"]) / steps));

              e.colors[i].delta["blue"] = Math.round(Number((rgb["blue"] - prergb["blue"]) / steps));

       }

 

       // fire the first morphing step

       setTimeout("_morphing(document.all." + e.id + ")", wait);

}

/////////////////////////////

 

 

 

/////////////////////////////

//// private function that does the work of morphing the element

function _morphing(e){

       e.step++;

 

       if(e.deltaTop!=null){

              e.style.posTop += e.deltaTop;

       }

 

       if(e.deltaLeft!=null){

              e.style.posLeft += e.deltaLeft;

       }

 

       if(e.deltaHeight!=null){

              e.style.posHeight += e.deltaHeight;

       }

 

       if(e.deltaWidth!=null){

              e.style.posWidth += e.deltaWidth;

       }

 

 

       for(var i=0;i<e.colors.length;i++){

              var rgb = _eat_rgb(e.style[e.colors[i].safename]);

              e.style[e.colors[i].safename]        = "rgb("

                                          + (e.colors[i].delta["red"] + rgb["red"])

                                          + ","

                                          + (e.colors[i].delta["green"] + rgb["green"])

                                          + ","

                                          + (e.colors[i].delta["blue"] + rgb["blue"])

                                          + ")";

       }

 

       // do special things when we are done

       if(e.step == e.done){

              if(e.deltaTop != null)

                     e.style.posTop = e.finalTop;

              if(e.deltaLeft != null)

                     e.style.posLeft = e.finalLeft;

              if(e.deltaWidth != null)

                     e.style.posWidth = e.finalWidth;

              if(e.deltaHeight != null)

                     e.style.posHeight = e.finalHeight;

              for(var i=0;i<e.colors.length;i++){

                     e.style[e.colors[i].safename]        = "rgb("

                                                 + (e.colors[i].finish["red"] + rgb["red"])

                                                 + ","

                                                 + (e.colors[i].finish["green"] + rgb["green"])

                                                 + ","

                                                 + (e.colors[i].finish["blue"] + rgb["blue"])

                                                 + ")";

              }

              e.morphing = false;

              eval(e.morphDone);

       }else{

              setTimeout("_morphing(document.all." + e.id + ")", e.wait);

       }

       return;

}

 

 

//////////////////

//// util for element attribute parsing

//// returns an array of all of the keys = values

function _eat_attrib(str){

       var chunks = new Array();

       var all = new Array();

 

       chunks=str.split(";");

 

       for(var i=0;i<chunks.length;i++){

              var tmpA = new Array();

              tmpA=chunks[i].split(":");

              all[tmpA[0]]=tmpA[1];

       }

       return all;

}

////////////////////

 

 

//////////////////

//// util for style rgb(#,#,#) parsing

//// returns an array of red/green/blue = number

function _eat_rgb(str){

       var all = new Array();

 

       var a = str.indexOf("(");

       var b = str.indexOf(")");

 

       str = str.substring(a + 1, b);

 

       var tmpA = str.split(",");

 

       all["red"]=Number(tmpA[0]);

       all["green"]=Number(tmpA[1]);

       all["blue"]=Number(tmpA[2]);

 

       return all;

}

////////////////////

 

</SCRIPT>

<body>

 

<SPAN ID="test" STYLE="border:5px solid rgb(0,0,0);color:rgb(255,255,255);position:absolute;top:0;left:0;width:400;height:400;overflow:hidden;background:rgb(0,0,255)">

欢迎光临 <B>javascript</B> 网页特效站,请多提意见!!

</SPAN>

<SCRIPT>

function rander(){

       var top = Math.round(Math.random() * 400);

       var left = Math.round(Math.random() * 600);

       var width = Math.round(Math.random() * 200);

       var height = Math.round(Math.random() * 200);

       var r = Math.round(Math.random() * 255);

       var g = Math.round(Math.random() * 255);

       var b = Math.round(Math.random() * 255);

       var background = "rgb(" + r + "," + g + "," + b + ")";

       var r = Math.round(Math.random() * 255);

       var g = Math.round(Math.random() * 255);

       var b = Math.round(Math.random() * 255);

       var borderColor = "rgb(" + r + "," + g + "," + b + ")";

       var r = Math.round(Math.random() * 255);

       var g = Math.round(Math.random() * 255);

       var b = Math.round(Math.random() * 255);

       var color = "rgb(" + r + "," + g + "," + b + ")";

       morph(document.all.test,30,20,"top:" + top + ";left:" + left + ";width:" + width + ";height:" + height + ";background:" + background + ";border-color:" + borderColor + ";color:" + color + ";","rander();");

}

 

rander();

 

</SCRIPT>

0 Comments

Mon

23

Feb

2009

32、实现的发光字体

32、实现的发光字体

<html>

 

<head>

<title>网页特效---通过滤镜实现的发光字体</title>

</head>

 

<body bgcolor="#000000">

 

<p id="me1"

style="position: absolute; left: 155; top: -1; width: 668; height: 405; filter: glow(color=#ffff00, strength=00)"

align="center"><font face="隶书" size="7" color="#FFFF00"><strong><b>发光字体</b></strong></font></p>

 

<div align="center">

  <center>

 

<table border="0" width="91%" height="163">

  <tr>

    <td width="74%" height="33"></td>

  </tr>

  <tr>

    <td width="74%" height="118"><font color="#0000FF" face="方正粗倩简体"> 

      字体发光的同时,变幻发光的强弱、颜色,将旁边的文字、图片照亮,与星光相互生辉,别有一番意境。</font><font

    color="#0000FF"><font face="方正粗倩简体">这里采用了</font><b>CSS</b><font face="方正粗倩简体">样式表单滤镜的强大功能,并且它们的参数由脚本语言来控制,这也是制作此类动画的一般方法,本例就使用</font><b>FrontPage</b><font face="方正粗倩简体"> </font><b>2000</b><font face="方正粗倩简体">通过滤镜来制作发光字体的效果。</font></font></td>

  </tr>

</table>

  </center>

</div>

<script language="vbscript">

dim i

dim j

i=0

j=0

sub window_onload()

me1.filters.glow.strength=i

me1.filters.glow.color=j

i=i+1

j=j+500

if i>250 then i=0

if j>26777215 then j=0

window.settimeout "window_onload()",100

end sub

</script>

 

 

<p> </p>

 

<p> </p>

 

<p> </p>

 

<p> </p>

<div style="position: absolute; top: 177; left: 302; width: 297; height: 116;index:3 "><font

face="方正粗倩简体">

 

<p></font> </p>

</div>

</body>

</html>

 

0 Comments

Mon

23

Feb

2009

31、类似FLASH文字转换

31、类似FLASH文字转换

<html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效--类似FLASH的文字转换</title>

 

</head>

 

<body>

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var qiksearch_js_text = new Array ("Hello 你好!", "欢迎你的光临", "网页特效", "http://7stk.com");

var qiksearch_space_width = 200; // The width of the content space

var qiksearch_space_height =30; // The height of the content space

var qiksearch_space_borderw=3; // Border width

var qiksearch_space_borderc="#CC0000"; // Border Color

var timeOutVal=150; // Delay in milliseconds

 

//--------------------------------------------------------------------------------------------

 

//-----------------------------DO-NOT-MODIFY-BELOW-THIS---------------------------------------

 

document.write('<table width="' + qiksearch_space_width + '" height="' + qiksearch_space_height + '" style="background:#FFFFFF; border:' + qiksearch_space_borderw + ' solid ' + qiksearch_space_borderc + '"><tr><td align="middle">');

document.write('<div id="qiksearch_js_space">');

document.write('</div>');

document.write('</td></tr></table>');

 

var def_10='A',def_11='B',def_12='C',def_13='D',def_14='E',def_15='F';

var colorVal=15;

var div_count=0;

 

function qiksearch_fade_desat(getColorIntVal)

{

 var returnVal;

 if(getColorIntVal>=10)

 {

  for(var i=0; i<=15; i++)

  {

   if((getColorIntVal==i))

   {

    returnVal = eval('def_' + i);

   }

  }

 }

 else

 {

  returnVal=getColorIntVal;

 }

 return(returnVal);

}

 

function writeDiv()

{

 document.all.qiksearch_js_space.innerHTML= '<font face="verdana,arial,helvetica" size="-1" color="' +  joinColor(qiksearch_fade_desat(colorVal)) + '"><b>' + qiksearch_js_text[div_count] + '</span></b></font>' ;

 

 if((colorVal>0)  && (colorVal!=0))

 {

  colorVal--;

 }

 else

 {

  colorVal=15;

  if(div_count<qiksearch_js_text.length)

  {

   div_count++;

  }

  if(div_count==qiksearch_js_text.length)

  {

   document.all.qiksearch_js_space.innerHTML = '<a href="javascript:resetAll();writeDiv();" style="text-decoration:none" accesskey="l"><font color="#808080" face="verdana,arial,helvetica" size="-1"><b>再来一遍!</b></font></a>';

  }

 }

 

 if(div_count<qiksearch_js_text.length)

 {

  setTimeout("writeDiv()",timeOutVal);

 }

}

 

function joinColor(getColor)

{

 return (getColor + '0' + getColor + '0' + getColor + '0');

}

 

function resetAll()

{

 div_count=0;

 colorVal=15;

}

 

writeDiv();

//  End -->

</script>

 

</body>

 

</html>

 

0 Comments