博文

鼠标跟随效果(2006-06-22 10:03:00)

摘要: 大家看了我博客上的鼠标跟随特效是不是也想拥有一个啊?呵呵,别急,我来教大家怎么做: 首先你要进入修改主模板页面,切换到源码。 再来就是找一个鼠标特效的代码,我的代码是这样的: <STYLE type=text/css>
.spanstyle {
COLOR:red; FONT-FAMILY: 宋体; FONT-SIZE: 10pt; POSITION: absolute; TOP: -50px; VISIBILITY: visible
}
</STYLE> <SCRIPT>
var x,y
var step=18
var flag=0
var message="感谢你的光临,希望你们玩的开心!幸福快乐!…………"
message=message.split("")
var xpos=new Array()
for (i=0;i<=message.length-1;i++) {
xpos[i]=-50
}
var ypos=new Array()
for (i=0;i<=message.length-1;i++) {
ypos[i]=-200
}
function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}
function www_helpor_net() {
if (flag==1 && document.all) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y
for (i=0; i<message.length-1; i++) {......

阅读全文(2502) | 评论:0

很炫的鼠标跟随效果,颜色可自定(2006-06-22 09:37:00)

摘要:<script>var a_Colour='fff000';var b_Colour='00ff00';var c_Colour='ff00ff';var Size=120;var YDummy=new Array(),XDummy=new Array(),xpos=0,ypos=0,ThisStep=0;step=0.6;if (document.layers){window.captureEvents(Event.MOUSEMOVE);function nsMouse(evnt){xpos=window.pageYOffset+evnt.pageX+6;ypos=window.pageYOffset+evnt.pageY+16;};window.onMouseMove = nsMouse;};else if(document.all){function ieMouse(){xpos=document.body.scrollLeft+event.x+6;ypos=document.body.scrollTop+event.y+16;};document.onmousemove = ieMouse;};function swirl(){for(i=0;i<3;i++){YDummy[i]=ypos+Size*Math.sin((1*Math.sin((ThisStep)/10))+i*2)*Math.sin((ThisStep)/4);XDummy[i]=xpos+Size*Math.cos((1*Math.sin((ThisStep)/10))+i*2)*Math.sin((ThisStep)/4);};ThisStep+=step;setTimeout('swirl()',10);};var amount=10;if(document.layers){for(i=0;i<amount;i++){document.write('<layer name=nsa'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+a_Colour+'></layer>');document.write('<layer name=nsb'+i+' top=0 left=0......

阅读全文(1865) | 评论:0