jsunity.de - Deutschlands beste Ressource für JavaScripts *** Hier finden Sie alles, was Sie für einen erfolgreichen Internetauftritt brauchen

        Tutorials von Thomas Frei-Herrmann

Ticker Statisch am unteren Ende des Browser-Fensters

für andere Ticker, guckt bitte auch hier

http://www.perlunity.de/javascript/scripts/javascript_0297_main.shtml

Den Code unten einfach in die HTML des Layouts kopieren.
Oben Eure Einstellungen vornehmen und unten Euren Text einfach unten in das Skript schreiben.

> auf Layout klicken > im Fenster “Layout-Eigenschaften” > Button “HTML”
> und das Skript unten “Zwischen Head Tags” einfügen

<style type="text/css">
body {margin:0px;}
#cont {position:absolute; top:-100px; left:0px; width:100%; height:18px; overflow:hidden; visibility:hidden;}
#text {position:relative; left:2000px; height:18px; font-family:tahoma,arial,helvetica,sans-serif; font-size:14px; font-weight:bold;}
#text a {color:#ffff99; font-family:tahoma,arial,helvetica,sans-serif; font-size:14px; font-weight:bold; text-decoration:none;}
#text a:hover{color:#ff0000; font-family:tahoma,arial,helvetica,sans-serif; font-size:14px; font-weight:bold; text-decoration:none;}
</style>
<script language="JavaScript1.2" type="text/javascript">
/************************************************************************ 
Script made by Martial Boissonneault © 2001 http://getElementById.com/
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*************************************************************************/
var ie5 = (document.getElementById && document.all);
var ns6 = (document.getElementById && !document.all);

var nWidth = 1000;              // Breite vom Ticker-Text in Pixeln; desto breiter je höher diese Zahl ist
var nSpeed = 3;                  // Geschwindikeit vom Ticker
var nBgOff = "#053F7E";      // Hintergrundfrabe onmouseout.
var nBgOn  = "#FF0000";     // Hintergrundfarbe onmouseover.
var nCoOff = "#FFFFFF";      // Schriftfarbe onmouseout.
var nCoOn  = "#FFFF00";    // Schriftfarbe onmouseover.

/* Ab hier nichts mehr ändern (außer Euren Text unten) */

var nEnd = -nWidth; 
var nLeft = nWidth;
var timerTt = null;
var timerSt = null;

function Statik() {
    if(ie5) {
        scrollY = document.body.scrollTop;
        innerHeight = document.body.clientHeight;
}
    if (ie5 || ns6) {
        obj.style.top = (innerHeight - obj.offsetHeight) + scrollY;
        obj.style.left = 0;
obj.style.width = 100 + "%";
timerSt=setTimeout("Statik()", 10);
}
}

function TickerTape(){
    if(ie5) {
        innerWidth = document.body.clientWidth;
}
    if(ie5 || ns6) {
        obj.style.backgroundColor = nBgOff;
obj.style.color = nCoOff;
        tck.style.left = nLeft;
        tck.style.width = nWidth;
        nLeft = nLeft - nSpeed;
        if( nLeft < nEnd ) {nLeft = innerWidth;}
        timerTt=setTimeout('TickerTape()', 30);
    }
}

function StopIt(){
        clearTimeout(timerTt);
        obj.style.backgroundColor = nBgOn
obj.style.color = nCoOn
}

function TickerInit(){
    if(ie5 || ns6) {
        tck = document.getElementById('text');
        obj = document.getElementById('cont');
        obj.style.visibility = "visible";
        obj.onmouseover=StopIt;
        obj.onmouseout=TickerTape;
        TickerTape();
Statik();
    }
}

onload=TickerInit;
</script>

<body onresize="{history.go(0)}">

<div id="cont">
    <div id="text">
    jsunity.de - Deutschlands beste Ressource für JavaScripts    ***    Hier finden Sie alles, was Sie für einen erfolgreichen Internetauftritt brauchen
    </div>
</div>
</body>

diese Seite weiter empfehlen



Counter Statistik