我知道这个肯定是用javascript来做,如果有知道正确代码的朋友分享一下, 先谢谢了。
是这样的:
我现在把一个SWF格式的动画放在层中,而层放在窗口中;当拖动滚动条时,而层的位置始终固定在当前显示的窗口坐标位置
參考答案:<div id="oLayer" style="position:absolute;left:30;top:60;">
<img src="";>
</div>
<SCRIPT>
document.write(new Array(100).join("<br>"))
var init_pos=last_pos=oLayer.style.posTop
setInterval(function scrollit(){
target_pos=document.body.scrollTop+init_pos
step=(target_pos-last_pos)/10|0
oLayer.style.posTop+=step
last_pos+=step
},1)
</script>