Okay, this is another very complicated one that I know people want to know how to do, the simple method is just to give you the code, and tell you what bits to change and what to leave the hell alone. Technically, this isn't HTML, it's Java Script.
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
var ctext = "This is the text that will change colours";
var speed = 1000;
var x = 0;
var color = new initArray(
"colour 1",
"colour 2",
"colour 3",
"colour 4",
"colour 5...you can add more colours by making more lines like this."
);
if(navigator.appName == "Netscape") {
document.write('<layer id="c">'+ctext+'</layer><br>');
}
if (navigator.appVersion.indexOf("MSIE") != -1){
document.write('<div id="c">'+ctext+'</div>');
}
function chcolor(){
if(navigator.appName == "Netscape") {
document.c.document.write('<font color="'+color[x]);
document.c.document.write('">'+ctext+'</font>');
document.c.document.close();
}
else if (navigator.appVersion.indexOf("MSIE") != -1){
document.all.c.style.color = color[x];
}
(x < color.length-1) ? x++ : x = 0;
}
setInterval("chcolor()",1000);
// EndA1 -->
</script>
|
Normal font tags can be added to manipulate the text size, etc.
|