欢迎光临
我们一直在努力

鼠标下浮动文字-ASP教程,ASP应用

建站超值云服务器,限时71元/月

<script language="javascript">

if (document.all) {

yourlogo = "luckyjan ● 健康快乐 ●";

logofont = "宋体";

logocolor = "blue";

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>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 鼠标下浮动文字-ASP教程,ASP应用
分享到: 更多 (0)