DHTML
Движущиеся объекты Подсветка кнопок Выпадающие меню Ожидание загрузки Drag'n'Drop Титры Телетайп Попади в меня! Анимация ActiveX Прозрачность Эффекты загрузки Шлейф Шторы JavaScript
English | Главная
Полезные ссылки:
|
<html>
<head>
<title>www.redmount.com - DHTML - Движущийся фон</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" 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>