标题:浮动图片不随滚动条移动---求助
只看楼主
jianghong_02
Rank: 6Rank: 6
等 级:侠之大者
威 望:1
帖 子:143
专家分:476
注 册:2010-10-2
结帖率:100%
 问题点数:0 回复次数:2 
浮动图片不随滚动条移动---求助
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>浮动窗口</title>
<script language="javascript" type="text/php">
var adv=0;
function Move(){
document.getElementById("radvLaye").style.pixelTop=adv+document.body.scrollTop;
}
window.onscroll=Move;
</script>
</head>

<body>
<div id="radvLaye" style="position:absolute;
    left:16px;
    top:129px;
    width:180px;
    height:230px;
    z-index:1;
    visibility: visible;"><img src="hero.gif" width="180" height="230" /></div>
    <p>&nbsp;</p>
<img src="menu.jpg" width="1024" height="1799" />
<p>&nbsp;</p>
</body>
</html>
搜索更多相关主题的帖子: 滚动 
2010-12-02 16:38
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
得分:0 
程序代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. xmlns="http://www. http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>浮动窗口</title>
<script>
var adv=0;
function Move(){
    document.getElementById("radvLaye").style.top=document.documentElement.scrollTop + 150 + 'px';
}
window.onscroll=Move;
</script>
</head>

<body style="height:9999px">
    <div id="radvLaye" style="position:absolute;left:16px;top:129px;width:180px;height:230px;z-index:1">fdafdsafdsafdsa</div>
</body>
</html>
<script language="javascript" type="text/php">
你这段不是搞笑吧?
2010-12-03 15:09
jianghong_02
Rank: 6Rank: 6
等 级:侠之大者
威 望:1
帖 子:143
专家分:476
注 册:2010-10-2
得分:0 
哈哈…………好像就是个搞笑,不我本人发的啦…………
2010-12-03 17:24



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-327672-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.525471 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved