网页之不断弹射的文字-特效
<style type="text/css">tP)u$gSx#CEw4Y#supertext {C*U Ku%].e(zw_*t
position:absolute;
left:0;
top:0;P NE#g!V1A"\
visibility:hide;h-nx7](u}4F
visibility:hidden;o ma\ |{9y
}
</style>#jK Z5W1|4U
<script language="JavaScript1.2">
<!-- 改变下的字体的大小。颜色-->$pu?;q8P
var thecontent='<h2><font size="2" face="宋体" color="FF0000">欢迎光临七色风网页家园</font></h2>'
var hidetimer='';
<!-- 改变下的弹跳速度-->k$A4S8S~6ri3E-M
var BallSpeed = 20;
var contentWidth;
var contentHeight;
var maxBallSpeed = 50;
/Ii+qU!V|7A|
0P,j(s(II
var xMax;BazL4a"OG9n
var yMax; D6f u6Ohx Z*Z
var xPos = 0;hd?m;\Q+y u8i
var yPos = 0;N^TOr
var xDir = 'right';
var yDir = 'down';)]I/d4E$m^s ~#l;r
var superballRunning = true; O&I uqj5fH8A
var tempBallSpeed;9^5_(ail
var currentBallSrc;-^l-IJ8?ou&X'Vc
var newXDir;
var newYDir;
*\p^ G'R"aTHr
function initializeBall() {
if (document.all) {#Kc$g I:?l"A7k?.K$y
xMax = document.body.clientWidth;C%khf n~ c p,\
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth$f3s(T%^@9M-O N@
contentHeight=supertext.offsetHeightK s6x`{J o
} F$s+^v6g'@/M.i
else if (document.layers) {
xMax = window.innerWidth;CJ(bA5t
yMax = window.innerHeight;LKT @*u7y4[?!s.~
contentWidth=document.supertext.document.width3yHKIj[
contentHeight=document.supertext.document.height
document.layers["supertext"].visibility = "show";6wj%K C6KPZ.f|
}7Hn4VIcIq\8C
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}
v2g,y$v:\2V
function moveBall() {
if (superballRunning == true) {YXN-eK9~5nbA
calculatePosition();
if (document.all) {bK p.S1nM.m|2T
document.all("supertext").style.left = xPos + document.body.scrollLeft;