TandemTables Forum

Full Version: Shelters fom the Storm
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

This demonstrates typewriter text and a moving background.

This how to create and position the typewriter text.

var i = 0;
var txt = 'some text to use.';
var speed = 50;

function marquee() {
if (i < txt.length) {
document.getElementById("show").innerHTML += txt.charAt(i);
setTimeout(marquee, speed);<!---->set speed to value. higher value slower text-->


#show{<!------>This id matches the id in the script. It positions and styles the text
text-align:justify; <------>set text alignment for proper typewriter effect


<div id=show></div> <!---->this div displays the text

The moving background was created using a trick. I'll leave the method up to the detectives to sleuths here, You'll laugh when you see how simple it is.

Very nice work Professor.
Reference URL's