Tak prerobil som to trochu ale nastal jeden problém v exploreri to mierne blbne, tu je ukazka
http://www.dornas.ic.cz/texty.html
Kód:
<span id="textik1" style="position:relative;left:20px;">T</span>
<span id="textik2" style="position:relative;left:40px;">e</span>
<span id="textik3" style="position:relative;left:60px;">x</span>
<span id="textik4" style="position:relative;left:80px;">t</span>
<span id="textik5" style="position:relative;left:100px;">,</span>
<span id="textik6" style="position:relative;left:120px;"> </span>
<span id="textik7" style="position:relative;left:140px;">T</span>
<span id="textik8" style="position:relative;left:160px;">e</span>
<span id="textik9" style="position:relative;left:180px;">x</span>
<span id="textik10" style="position:relative;left:200px;">t</span>
<script>
var pocet = 10; pocet++; //Zadaj počet pismen
var i = 1;
while(i<pocet){
var stylTextu = new Array();
stylTextu[i] = document.getElementById("textik"+i).style;
var poziceX = new Array(0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200);
i++;}
var poziceY = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var koniecX = 0;
var posun = 400;
function start(i){
var i = 1;
while(i<pocet){
window.setInterval("krok(-20,0,"+i+")", 400)
i++;}
}
function krok(stepX,stepY,i){
if(poziceX[i]<koniecX){poziceX[i]=posun}
poziceX[i] += stepX;
poziceY[i] += stepY;
var toto = stylTextu[i];
document.getElementById("textik"+i).style.left = poziceX[i] + "px";
toto.top = poziceY[i] + "px";
}
start()
</script>
Zatiaľ to nefunguje na osi Y, ale o to mi ani nešlo.
tak ak by dakto vedel poradiť prečo to v Exploreri robí to čo robí bol by som vďačný
PS: v Opere to ide tak ako na FireFoxe