Javascript is possible:
Make two copies of the scrollable text, separated by the width of the container. Animation (displayed on the left on the left) (displayed on the right on the right), then bounce back and repeat.
Something line by line (unchecked using jQuery):
<div class="outer"> <div class="inner"> some text </div> </div>
CSS
.outer, .inner { width: 100%; } .outer { position: relative; overflow: hidden; } .inner { position: absolute; }
JS:
(function rerun(){ var time = 10000 //ms $(".inner").slice(0,-1).remove() $i1=$(".inner") $i2=$i1.clone() $i1.css({left:0}).animate({left:"-100%"}, time) $i2.insertAfter($i1).css({left:"100%"}).animate({left:0}, time, rerun) })()
Thus, the text should begin on the right side as soon as it begins to disappear on the right side. Change the relative width to achieve a different effect.
John dvorak
source share