介绍:
演示:
[Ctrl+A全选 提示:你可先修改部分代码,再按运行]
下面教你如何应用此特效:
--------------------------------------------------------------------------------------
需要在<body
这里>加入的代码:
--------------------------------------------------------------------------------------
以下代码加到<head>…</head>中
以下代码加到<body>…</body>中
<style type="text/css">
<!--
.opacity { filter: alpha(opacity=100) }
-->
</style>
<script>
function movstar(a,time){
movx=setInterval("mov("+a+")",time)
}
function movover(){
clearInterval(movx)
}
function mov(a){
scrollx=new_date.document.body.scrollLeft
scrolly=new_date.document.body.scrollTop
scrolly=scrolly+a
new_date.window.scroll(scrollx,scrolly)
}
function o_down(theobject){
object=theobject
while(object.filters.alpha.opacity>60){
object.filters.alpha.opacity+=-10}
}
function o_up(theobject){
object=theobject
while(object.filters.alpha.opacity<100){
object.filters.alpha.opacity+=10}
}
function wback(){
if(new_date.history.length==0){window.history.back()}
else{new_date.history.back()}
}
</script>
<iframe border=0 frameborder=0 framespacing=0 height=80 marginheight=0 marginwidth=0 name=new_date noResize scrolling=no src="http://www.zzsc.org/texiao/zzsc_demo/iframe.htm" width=400 vspale="0"></iframe>
<img alt="点住不放可以快速向上滚动" border="0" class="opacity" onmousedown="movover();movstar(-3,2)" onmouseout="movover();o_up(this)" onmouseover="movstar(-1,20);o_down(this)" onmouseup="movover();movstar(-1,20)" src="http://www.zzsc.org/texiao/zzsc_demo/top.gif" width="13" height="13">
<img alt="点住不放可以快速向下滚动" border="0" class="opacity" onmousedown="movover();movstar(3,2)" onmouseout="movover();o_up(this)" onmouseover="movstar(1,20);o_down(this)" onmouseup="movover();movstar(1,20)" src="http://www.zzsc.org/texiao/zzsc_demo/dottom.gif" width="13" height="13">