代码如下
<SCRIPT LANGUAGE="JavaScript">
if (document.all) {
yourLogo = "爱你一万年天荒地老永不变";
logoFont = "宋体";
logoColor = "000000";
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
ie[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
}
</script>
做好能将文字改成旋转彩色闪烁那就太好了
參考答案:logoColor = "000000"; 改为logoColor = "ff0000";
动态鼠标的插入
在</STYLE>后面插入
<STYLE type=text/css>
<!--
body{cursor:url(**.ani );}
a{cursor:url('**.cur ');}
-->
</STYLE>
说明:
1、( )号中的为你的图标的路径,后缀名还有**.ico的,和**.ani的.
2、第一个路径是鼠标移动时的指针。第二个路径是接触链接时的指针。
后缀名为**.ico 的为静态
后缀名为**.cur 的为静态
后缀名为**.ani 的为动画
鼠标特效example:
01 白色小企鹅 CURSOR: url('');
02 奔跑的狗狗 CURSOR: url('');
03 蓝色小海豚 CURSOR: url('');
04 正面小提琴 CURSOR: url('');
05 走路的海龟 CURSOR: url('');
06 动态红缨枪 CURSOR: url('');
07 在飞的蝴蝶 CURSOR: url('');
08 静态的莲花 CURSOR: url('');
09 毛笔 CURSOR: url('');
10 铅笔 CURSOR: url('');