Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rolling background

    Hi,

    I would like to make the background on a webpage rolling like it does on an old b/w TV. Is it possible to do it? How?

    Thanks,

    Johan

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    If it wasn't too big you could use an animated gif to do it... Otherwise it'd be best to use Flash or something similar. How much of the screen do you want to roll?

  • #3
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    	<head>
    		<title>50667</title>
    		<style type="text/css">
    			html
    			{
    				background:#fff url(/images/1.jpeg) 0 0 fixed;
    			}
    		</style>
    		<script type="text/javascript">
    			var y = 0;
    			var step = 2;
    			
    			function move_image()
    			{
    				y += step;
    				document.getElementsByTagName("html")[0].style.backgroundPosition = "0px " + y + "px";
    			}
    			
    			setInterval("move_image()",50);
    		</script>
    	</head>
    	<body>
    		<p>Text</p>
    	</body>
    </html>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •