漂浮图片 在一个有flash的页面里移动特别慢,是怎么回事啊
漂浮代码:
<div id="dd" style="position:absolute; left:200px; top:50px; width:70px; height:70px; z-index:50">
<a href="http://210.82.31.82/20070508yzhb/"><img src="snap1.gif" border="0"></a>
</div>
<div align="center">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var xPos = document.body.clientWidth-140;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 10;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
dd.style.top = yPos;
function changePos()
{
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = dd.offsetHeight;
Woffset = dd.offsetWidth;
dd.style.left = xPos + document.body.scrollLeft;
dd.style.top = yPos + document.body.scrollTop;
if (yon)
{
yPos = yPos + step;
}
else
{
yPos = yPos - step;
}
if (yPos < 0)
{
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset))
{
yon = 0;
yPos = (height - Hoffset);
}
// if (xon)
// {
// xPos = xPos + step;
// }
// else
// {
// xPos = xPos - step;
// }
// if (xPos < 0)
// {
// xon = 1;
// xPos = 0;
// }
// if (xPos >= (width - Woffset))
// {
// xon = 0;
// xPos = (width - Woffset);
// }
}
function start()
{
dd.visibility = "visible";
interval = setInterval('changePos()', delay);
dd.onmouseover=function(){clearInterval(interval)};
dd.onmouseout=function(){start()};
}
start();
// End -->
</script>
</div>
<div id="dd" style="position:absolute; left:200px; top:50px; width:70px; height:70px; z-index:50">
<a href="http://210.82.31.82/20070508yzhb/"><img src="snap1.gif" border="0"></a>
</div>
<div align="center">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var xPos = document.body.clientWidth-140;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 10;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
dd.style.top = yPos;
function changePos()
{
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = dd.offsetHeight;
Woffset = dd.offsetWidth;
dd.style.left = xPos + document.body.scrollLeft;
dd.style.top = yPos + document.body.scrollTop;
if (yon)
{
yPos = yPos + step;
}
else
{
yPos = yPos - step;
}
if (yPos < 0)
{
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset))
{
yon = 0;
yPos = (height - Hoffset);
}
// if (xon)
// {
// xPos = xPos + step;
// }
// else
// {
// xPos = xPos - step;
// }
// if (xPos < 0)
// {
// xon = 1;
// xPos = 0;
// }
// if (xPos >= (width - Woffset))
// {
// xon = 0;
// xPos = (width - Woffset);
// }
}
function start()
{
dd.visibility = "visible";
interval = setInterval('changePos()', delay);
dd.onmouseover=function(){clearInterval(interval)};
dd.onmouseout=function(){start()};
}
start();
// End -->
</script>
</div>
...全文
相关推荐
透明flash被风吹动的树叶漂浮动画效果代码
本主题聚焦于“透明Flash被风吹动的树叶漂浮动画效果代码”,这是一个利用ActionScript(Flash编程语言)实现的视觉特效,旨在模拟自然环境中树叶随风摇曳的景象。
漂浮的羽毛,羽毛动画
在IT行业中,动画制作是数字艺术的一个重要领域,特别是在网页设计、游戏开发和互动媒体中。
200Flash素材,Flash开发素材,swf素材
在IT行业中,Flash曾是网页设计和动画制作的重要工具,特别是在动态内容展示和交互性设计上。
PHPCMS广告管理设置
**浮动广告**:在网页窗口中漂浮移动的广告,能够吸引用户的注意力。2. **随屏移动**:类似于传统的“对联广告”,常出现在页面两侧,随用户的滚动而移动。3.
EasyJMS人才管理系统 v2.5.091001 国庆特别版
是一款基于微软.NET平台,使用 C# + MSSQL2000数据库独立开发和构架的一个强大的人才系统。易维人才管理系统采用三层架构模式开发,功能易于进行扩展和二次开发,可面向中小站点提供网站建设解决


