2个回答
2013-12-11
展开全部
<html>
<head>
<title>floaticon</title>
<script language="javascript">
var x=0;
var y=0;
var dx=5;
var dy=5;
function float()
{
x+=dx;
y+=dy;
floaticon.style.left = x;
floaticon.style.top = y;
if(x<=0 || x>=document.body.clientWidth-floaticon.offsetWidth)
dx=-dx;
if(y<=0 || y>=document.body.clientHeight-floaticon.offsetHeight)
dy=-dy;
setTimeout("float()",50);
}
//setInterval("float()",50);
setTimeout("float()",50);
</script>
</head>
<body>
<div id="floaticon" style="position:absolute">
<a href="tomcat.gif" target="_blank"><img src="tomcat.gif" border=0></a>
</div>
</body>
</html>
<head>
<title>floaticon</title>
<script language="javascript">
var x=0;
var y=0;
var dx=5;
var dy=5;
function float()
{
x+=dx;
y+=dy;
floaticon.style.left = x;
floaticon.style.top = y;
if(x<=0 || x>=document.body.clientWidth-floaticon.offsetWidth)
dx=-dx;
if(y<=0 || y>=document.body.clientHeight-floaticon.offsetHeight)
dy=-dy;
setTimeout("float()",50);
}
//setInterval("float()",50);
setTimeout("float()",50);
</script>
</head>
<body>
<div id="floaticon" style="position:absolute">
<a href="tomcat.gif" target="_blank"><img src="tomcat.gif" border=0></a>
</div>
</body>
</html>
2013-12-11
展开全部
那叫浮动广告~~这问题问的,好像外星人一样!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询