Background Image Scroller
Written by admin on December 25, 2008 – 6:41 am -Animate your background-image with this tiny and eyecatching script
Author: Peter Gehrig
<SCRIPT>
// CREDITS:
// Background Image Scroller
// By Urs Dudli and Peter Gehrig
// Copyright (c) 2003 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// URL of slide
var slide="bg.gif"
// Do not edit the code below this line
var imgpreload=new Image()
imgpreload.src=slide
var pos=0;
var maxpos=99999999999999;
var ns6=document.getElementById&&!document.all?1:0
var ie=document.all?1:0
function initscroll(){
if (ie || ns6) {
document.body.background=slide;
doscroll()
}
}
function doscroll(){
pos++;
document.body.style.backgroundPosition=pos+" "+pos;
var timer=setTimeout("doscroll()",30);
}
if (ie || ns6) {
window.onload=initscroll;
}
</script>
Tags: Background Effects
Posted in Background Effects |