{DHTML: Moving Text}

WebmasterNETZ

Quelltext in den HEAD-Bereich:

<!-- -->
<!-- JavaScript Example, freeware -->
<!-- -->
<!-- Copyright (c) 1997,98 by Wojciech Wysznacki -->
<!-- E-mail: woytek@polbox.com -->
<!-- WWW : http://www.polbox.com/w/woytek -->
<!-- -->
<script LANGUAGE="JavaScript">
<!--
done = 0;
step = 4
function anim(yp,yk)
{
if(document.layers) document.layers["napis"].top=yp;
else document.all["napis"].style.top=yp;
if(yp>yk) step = -4
if(yp<60) step = 4
setTimeout('anim('+(yp+step)+','+yk+')', 35);
}
function start()
{
if(done) return
done = 1;
if(navigator.appName=="Netscape") {
document.napis.left=innerWidth/2 - 145;
anim(60,innerHeight - 60)
}
else {
napis.style.left=11;
anim(60,document.body.offsetHeight - 60)
}
}
//-->
</script>

Quelltext in den Body-Bereich:

<div id="napis"
style="position: absolute; top: -50; color: #D25866; font-family: Arial, Helvetica; font-weight:bold; font-size:40px;">
<p>Ihr Text</p>
</div><script LANGUAGE="JavaScript">
<!--
setTimeout('start()',10);
//-->
</script>


by Christian Thiele - WebmasterNETZ - 1999 - http://www.webmasternetz.de

 

 

 

[Fenster schließen]

2000 - 2008 © by: webmaster-support.de