TandemTables Forum
Shelters fom the Storm - Printable Version

+- TandemTables Forum (http://tandemtables.com/forum)
+-- Forum: Tandem Trends (/forumdisplay.php?fid=1)
+--- Forum: Code (/forumdisplay.php?fid=3)
+--- Thread: Shelters fom the Storm (/showthread.php?tid=19526)



Shelters fom the Storm - The Professor - 01-12-2021 12:28 AM

http://d21c.com/leprofesseur/Shelter.html

This demonstrates typewriter text and a moving background.

This how to create and position the typewriter text.

<script>
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);
i++;
setTimeout(marquee, speed);<!---->set speed to value. higher value slower text-->
}
}
</script>

<style>


#show{<!------>This id matches the id in the script. It positions and styles the text
position:absolute;left:210px;top:450px;
width:1000px;height:140px;
text-align:justify; <------>set text alignment for proper typewriter effect
}

<body>

<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.


RE: Shelters fom the Storm - Handy - 01-18-2021 06:26 PM

Very nice work Professor.