javascript特效
javascrip用户手册 源码+效果显示 跟随鼠标的*[推荐][共2步][无须修改] [顺便告诉你并不一定非用*发挥你的想象改吧!不过好象还是*比较漂亮!] ====1、将以下代码加入到HEML的之间: ====2、将以下代码加入HTML的之间: * * * * var nav = (document.layers); var tmr = null; var spd = 50; var x = 0; var x_offset = 5; var y = 0; var y_offset = 15; if(nav) document.captureEvents(Event.MOUSEMOVE); document.onmousemove = get_mouse; function get_mouse(e) { x = (nav) ? e.pageX : event.clientX+document.body.scrollLeft; y = (nav) ? e.pageY : event.clientY+document.body.scrollTop; x += x_offset; y += y_offset; beam(1); } function beam(n) { if(n0) { if(nav)eval("document.div"+n+".visibility='hidden'"); else eval("div"+n+".style.visibility='hidden'"); n--; tmr=setTimeout("fade("+n+")",spd); } else clearTimeout(tmr); } // --> ute; font-size : 20pt; color : red; visibility : hidden; } .s3 { position : absolute; font-size : 16pt; color : gold; visibility : hidden; } .s4 { position : absolute; font-size : 14pt; color : lime; visibility : hidden; } --> ====2、将以下代码加入HTML的之间: * * * * var nav = (document.layers); var tmr = null; var spd = 50; var x = 0; var x_offset = 5; var y = 0; var y_offset = 15; if(nav) document.captureEvents(Event.MOUSEMOVE); document.onmousemove = get_mouse; function get_mouse(e) { x = (nav) ? e.pageX : event.clientX+document.body.scrollLeft; y = (nav) ? e.pageY : event.clientY+document.body.scrollTop; x += x_offset; y += y_offset; beam(1); } function beam(n) { if(n0) { if(nav)eval("document.div"+n+".visibility='hidden'"); else eval("div"+n+".style.visibility='hidden'"); n--; tmr=setTimeout("fade("+n+")",spd); } else clearTimeout(tmr); } // -->
用户评论