实现广告在右边浮动
来源:网络 责任编辑:admin 发表时间:2013-07-01 07:19 点击:次
lastScrollY = 0;
function heartBeat() {
diffY = document.body.scrollTop;
percent = .1 * (diffY - lastScrollY);
if (percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
//right是浮动层的id
document.all.right.style.pixelTop += percent;
lastScrollY = lastScrollY + percent;
}
window.setInterval("heartBeat()", 1);
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 进入详细评论页>>