DHTML
Moving Objects Rollover Pulldown Menu Preloading Drag'n'Drop Scrolling Text Teletype Shoot Me! Animation ActiveX Opacity Transition Mad Bubbles Gates JavaScript
Russian | Main Page
Useful links:
|
<html> <head> <title>www.redmount.com - DHTML - Moving Background</title> </head> <script language="javascript"> <!-- //global variables var topStopPoint="null",layerRef="null",styleSwitch="null",currtop=-100; function init() { layerRef="document.all"; styleSwitch=".style"; topStopPoint="-40px"; moveLayerTo('movingBG'); } // --> </script> <style type="text/css"> #movingBG {position: absolute; z-index: 10; visibility: visible; left: 0px; top: 0px;} #text {position: absolute; z-index: 20; visibility: visible; left: 15px; top: 15px;} </style> <body bgcolor="Black" text=white vlink=silver onLoad=init() link=yellow vlink=white> <script language=javascript> <!-- function moveLayerTo(layerName) { if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top != topStopPoint')) { currtop+=2; eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = currtop'); setTimeout('moveLayerTo("'+layerName+'")',20); } else { currtop=-196; eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = currtop'); setTimeout('moveLayerTo("'+layerName+'")',20); } } //--> </script> <div id="text">Text</div> <div id="movingBG"> <table width="100%" border="0" background="snow.gif" height="11500"> <tr> <td> </td> </tr> </table> </div> </body> </html>