JavaScript 特效:与君共舞 |
|
哈哈哈这么多姑娘和你跳舞
你只要把下面的代码另存为网页文件就可以见到我的制作效果啦 注意:你要是真想让几个姑娘和你的鼠标一块舞起来你自己可以试着去改一下那几个层,把像素变成美女图就可以啦, <html> <head> <script language=JavaScript> <!-- alert("欢迎光临netmaster休憩室!本站由刘荣制作维护!版权由刘荣所有!") //--> </script> </head> <body bgcolor="#FFFFFF" onunload="alert('感谢您的访问! 欢迎再次到来!')"> <SCRIPT> /* Scrolling Image Map/Text Link Tooltip Script- Special Thanks to: Rob(http://rob.yeah.net) Miss Ann(http://annworld.126.com) */ if (!document.layers&&!document.all) event="test" function showtip2(current,e,text){ if (document.all&&document.readyState=="complete"){ document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>' document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10 document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10 document.all.tooltip2.style.visibility="visible" } else if (document.layers){ document.tooltip2.document.nstip.document.write('<b>'+text+'</b>') document.tooltip2.document.nstip.document.close() document.tooltip2.document.nstip.left=0 currentscroll=setInterval("scrolltip()",100) document.tooltip2.left=e.pageX+10 document.tooltip2.top=e.pageY+10 document.tooltip2.visibility="show" } } function hidetip2(){ if (document.all) document.all.tooltip2.style.visibility="hidden" else if (document.layers){ clearInterval(currentscroll) document.tooltip2.visibility="hidden" } } function scrolltip(){ if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width) document.tooltip2.document.nstip.left-=5 else document.tooltip2.document.nstip.left=150 } </SCRIPT> <SCRIPT language=JavaScript> function YY_Layerfx(yyleft,yytop,yyfnx,yyfny,yydiv,yybilder,yyloop,yyto,yycnt,yystep) { //v1.2 //copyright (c)1999 Yaromat, Jaro von Flocken if ((document.layers)||(document.all)){ with (Math) {yynextx= eval(yyfnx)} with (Math) {yynexty= eval(yyfny)} yycnt=(yyloop && yycnt>=yystep*yybilder)?0:yycnt+yystep; if (document.layers){ eval(yydiv+".top="+(yynexty+yytop)) eval(yydiv+".left="+(yynextx+yyleft)) } if (document.all){ eval("yydiv=yydiv.replace(/.layers/gi, '.all')"); eval(yydiv+".style.pixelTop="+(yynexty+yytop)); eval(yydiv+".style.pixelLeft="+(yynextx+yyleft)); } argStr='YY_Layerfx('+yyleft+','+yytop+',"'+yyfnx+'","'+yyfny+'","'+yydiv+'",'+yybilder+','+yyloop+','+yyto+','+yycnt+','+yystep+')'; if (yycnt<=yystep*yybilder){eval(yydiv+".yyto=setTimeout(argStr,yyto)");} } } function YY_Mousetrace(evnt) { //v1.2 copyright (c)1999 Yaromat if (yyns4) {if (evnt.pageX) {yy_ml=evnt.pageX; yy_mt=evnt.pageY;} } else{ yy_ml=(event.clientX + document.body.scrollLeft); yy_mt=(event.clientY + document.body.scrollTop); } if (yy_tracescript)eval(yy_tracescript) } </SCRIPT> <SCRIPT language=JavaScript> function PopWin() { var PopWin = window.open("new.htm","PopWin","toolbar=no,directries=no,scrollBars=yes,height=350,width=400"); } </SCRIPT> <DIV id=tooltip2 style="BACKGROUND-COLOR: lightyellow; CLIP: rect(0px 150px 50px 0px); POSITION: absolute; VISIBILITY: hidden; WIDTH: 150px"><LAYER bgcolor="lightyellow" width="1000px" name="nstip"></LAYER></DIV> <DIV id=yyd0 style="BACKGROUND-COLOR: #19636c; BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; CLIP: rect(0px 3px 3px 0px); HEIGHT: 3px; LEFT: 10px; POSITION: absolute; TOP: 50px; WIDTH: 3px; Z-INDEX: 1; layer-background-color: #19636c"></DIV> <DIV id=yyd1 style="BACKGROUND-COLOR: #708574; BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; CLIP: rect(0px 3px 3px 0px); HEIGHT: 3px; LEFT: 20px; POSITION: absolute; TOP: 50px; WIDTH: 3px; Z-INDEX: 1; layer-background-color: #708574"></DIV> <DIV id=yyd2 style="BACKGROUND-COLOR: #379bbf; BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; CLIP: rect(0px 3px 3px 0px); HEIGHT: 3px; LEFT: 30px; POSITION: absolute; TOP: 50px; WIDTH: 3px; Z-INDEX: 1; layer-background-color: #379bbf"></DIV> <DIV id=yyd3 style="BACKGROUND-COLOR: #25184c; BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; CLIP: rect(0px 3px 3px 0px); HEIGHT: 3px; LEFT: 40px; POSITION: absolute; TOP: 50px; WIDTH: 3px; Z-INDEX: 1; layer-background-color: #25184c"></DIV> <DIV id=yyd4 style="BACKGROUND-COLOR: #31bd3c; BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; CLIP: rect(0px 3px 3px 0px); HEIGHT: 3px; LEFT: 50px; POSITION: absolute; TOP: 50px; WIDTH: 3px; Z-INDEX: 1; layer-background-color: #31bd3c"></DIV> <DIV id=yyd5 style="BACKGROUND-COLOR: #c11efd; BORDER-BOTTOM: #000000 1px; BORDER-LEFT: #000000 1px; BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; CLIP: rect(0px 3px 3px 0px); HEIGHT: 3px; LEFT: 60px; POSITION: absolute; TOP: 50px; WIDTH: 3px; Z-INDEX: 1; layer-background-color: #c11efd"></DIV> <SCRIPT> var yyns4=window.Event?true:false; var yy_mt = 0; var yy_ml = 0; document.onmousemove = YY_Mousetrace; yy_tracescript = ''; if (yyns4){ document.captureEvents(Event.MOUSEMOVE); YY_Mousetrace('',',document.YY_Mousetrace1')} YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/39.83007847812662))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/34.224861639800686))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers['yyd0']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/27.66510707209673))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/9.240632767417667))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers['yyd1']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/16.45318944579641))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/16.0564452288292))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers['yyd2']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/6.95348954836835))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/44.13697049887155))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers['yyd3']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/33.90077294583733))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/2.2378828869411587))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers['yyd4']',2000,true,80,0,1); YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/37.858312521039835))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/18.083839795990098))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers['yyd5']',2000,true,80,0,1); </SCRIPT> <SCRIPT> /* Scrolling Image Map/Text Link Tooltip Script- Special Thanks to: Rob(http://rob.yeah.net) Miss Ann(http://annworld.126.com) */ if (!document.layers&&!document.all) event="test" function showtip2(current,e,text){ if (document.all&&document.readyState=="complete"){ document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>' document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10 document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10 document.all.tooltip2.style.visibility="visible" } else if (document.layers){ document.tooltip2.document.nstip.document.write('<b>'+text+'</b>') document.tooltip2.document.nstip.document.close() document.tooltip2.document.nstip.left=0 currentscroll=setInterval("scrolltip()",100) document.tooltip2.left=e.pageX+10 document.tooltip2.top=e.pageY+10 document.tooltip2.visibility="show" } } function hidetip2(){ if (document.all) document.all.tooltip2.style.visibility="hidden" else if (document.layers){ clearInterval(currentscroll) document.tooltip2.visibility="hidden" } } function scrolltip(){ if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width) document.tooltip2.document.nstip.left-=5 else document.tooltip2.document.nstip.left=150 } </SCRIPT> <SCRIPT language=JavaScript> function YY_Layerfx(yyleft,yytop,yyfnx,yyfny,yydiv,yybilder,yyloop,yyto,yycnt,yystep) { //v1.2 //copyright (c)1999 Yaromat, Jaro von Flocken if ((document.layers)||(document.all)){ with (Math) {yynextx= eval(yyfnx)} with (Math) {yynexty= eval(yyfny)} yycnt=(yyloop && yycnt>=yystep*yybilder)?0:yycnt+yystep; if (document.layers){ eval(yydiv+".top="+(yynexty+yytop)) eval(yydiv+".left="+(yynextx+yyleft)) } if (document.all){ eval("yydiv=yydiv.replace(/.layers/gi, '.all')"); eval(yydiv+".style.pixelTop="+(yynexty+yytop)); eval(yydiv+".style.pixelLeft="+(yynextx+yyleft)); } argStr='YY_Layerfx('+yyleft+','+yytop+',"'+yyfnx+'","'+yyfny+'","'+yydiv+'",'+yybilder+','+yyloop+','+yyto+','+yycnt+','+yystep+')'; if (yycnt<=yystep*yybilder){eval(yydiv+".yyto=setTimeout(argStr,yyto)");} } } function YY_Mousetrace(evnt) { //v1.2 copyright (c)1999 Yaromat if (yyns4) {if (evnt.pageX) {yy_ml=evnt.pageX; yy_mt=evnt.pageY;} } else{ yy_ml=(event.clientX + document.body.scrollLeft); yy_mt=(event.clientY + document.body.scrollTop); } if (yy_tracescript)eval(yy_tracescript) } </SCRIPT> <SCRIPT language=JavaScript> function PopWin() { var PopWin = window.open("new.htm","PopWin","toolbar=no,directries=no,scrollBars=yes,height=350,width=400"); } </SCRIPT> </body> </html> 你要是觉得图层少你还可以再加图层, 这其实是DREAMWEAVER 3。0的一个插件你可以从网上下载 |