文本滚动处理可调速

<!-- 脚本说明:-->
<!-- 把如下代码加入<body>区域中-->
<style type="text/css">
#divUp   {position:absolute; left:170px; top:190px;}
#divDown {position:absolute; left:170px; top:380px;}
#divScrollTextCont {position:absolute; left:170px; top:220px; width:300px; height:150px; clip:rect(0px 300px 150px 0px); overflow:hidden; visibility:hidden;}
#divText {position:absolute; left:0px; top:0px;}
</style>
<script language="JavaScript" type="text/javascript">
function lib_bwcheck(){ //Browsercheck (needed)
 this.ver=navigator.appVersion
 this.agent=navigator.userAgent
 this.dom=document.getElementById?1:0
 this.opera5=this.agent.indexOf("Opera 5")>-1
 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
 this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
 this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
 this.ie=this.ie4||this.ie5||this.ie6
 this.mac=this.agent.indexOf("Mac")>-1
 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
 this.ns4=(document.layers && !this.dom)?1:0;
 this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
 return this
}
var bw=new lib_bwcheck()


/*****************

You set the width and height of the divs inside the style tag, you only have to
change the divScrollTextCont, Remember to set the clip the same as the width and height.
You can remove the divUp and divDown layers if you want.
This script should also work if you make the divScrollTextCont position:relative.
Then you should be able to place this inside a table or something. Just remember
that Netscape crash very easily with relative positioned divs and tables.

Updated with a fix for error if moving over layer before pageload.

****************/


//If you want it to move faster you can set this lower, it's the timeout:
var speed = 30

//Sets variables to keep track of what's happening
var loop, timer

//Object constructor
function makeObj(obj,nest){
    nest=(!nest) ? "":'document.'+nest+'.'
 this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
   this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
 this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
 this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
 this.up=goUp;this.down=goDown;
 this.moveIt=moveIt; this.x=0; this.y=0;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

function moveIt(x,y){
 this.x = x
 this.y = y
 this.css.left = this.x+px
 this.css.top = this.y+px
}

//Makes the object go up
function goDown(move){
 if (this.y>-this.scrollHeight+oCont.clipHeight){
  this.moveIt(0,this.y-move)
   if (loop) setTimeout(this.obj+".down("+move+")",speed)
 }
}
//Makes the object go down
function goUp(move){
 if (this.y<0){
  this.moveIt(0,this.y-move)
  if (loop) setTimeout(this.obj+".up("+move+")",speed)
 }
}

//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(speed){
 if (scrolltextLoaded){
  loop = true;
  if (speed>0) oScroll.down(speed)
  else oScroll.up(speed)
 }
}

//Stops the scrolling (called on mouseout)
function noScroll(){
 loop = false
 if (timer) clearTimeout(timer)
}
//Makes the object
var scrolltextLoaded = false
function scrolltextInit(){
 oCont = new makeObj('divScrollTextCont')
 oScroll = new makeObj('divText','divScrollTextCont')
 oScroll.moveIt(0,0)
 oCont.css.visibility = "visible"
 scrolltextLoaded = true
}
//Call the init on page load if the browser is ok...
if (bw.bw) onload = scrolltextInit
</script>
<div id="divUp">
 <a href="#" οnmοuseοver="scroll(-2)" οnmοuseοut="noScroll()" οnclick="return false">[慢速]</a>
 <a href="#" οnmοuseοver="scroll(-7)" οnmοuseοut="noScroll()" οnclick="return false">[中速]</a>
 <a href="#" οnmοuseοver="scroll(-10)" οnmοuseοut="noScroll()" οnclick="return false">[快速]</a>
</div>

<div id="divDown">
 <a href="#" οnmοuseοver="scroll(2)" οnmοuseοut="noScroll()" οnclick="return false">[慢速]</a>
 <a href="#" οnmοuseοver="scroll(7)" οnmοuseοut="noScroll()" οnclick="return false">[中速]</a>
 <a href="#" οnmοuseοver="scroll(10)" οnmοuseοut="noScroll()" οnclick="return false">[快速]</a>
</div>

<div id="divScrollTextCont">
 <div id="divText">
  <p>新闻: <br>
<br>    在主场击败灰熊之前,快船已经在他们之前9场的比赛当中输掉了8场,即便是大话连篇的主教练金特里也不得不承认这是他在教练生涯里所经历的最为黯淡的时刻。但是即便是这样严重的危机也没有触动金特里固执的神经,在主场击败灰熊之后,金特里又感觉良好地走在了老路上。金特里必须知道:“一场胜利并不意味着情况得到了扭转,不断下沉的快船有太多的窟窿要紧急修补。”

<br>    即使只从数据上来看,快船的退步也是十分明显的,他们的平均得分已经从每场95.7分下降到92.5分,命中率从43.8%下降到43.3%,篮板数从每场43.5个下降到41.7个,快船队的技术统计在全面下降,当然也有一些数据在升高,比如失误数,他们现在平均每场比赛失误16.5次。

<br>    金特里直到现在还在坚持,一旦快船队的主力球员能够从伤病中康复,一旦他能够重新拥有全部的队员,一切都会重归平静,快船队又会成为一支实力不俗的强队。他的全部论断都是建立在快船队这个赛季仅有的几场拿的出手的胜利。比如他们战胜活塞,击败马刺,以及两胜火箭。

<br>    我必须说我同意金特里的部分观点,那就是这支球队的确充满了潜力,而且的确有很多货真价实的天才。但是要知道,在这个联盟之中,同样充满潜力的球队并不在少数,偶尔的一场漂亮胜利,任何一支球队都能够取得,问题的关键是能否持续稳定地表现出较高地竞技水准。快船有足够的条件让自己成为一支强队,前提是他们必须找到正确的方法。

<br>    米勒是一个关键性的球员,因为伤病而只在本赛季出场六次的小前锋奥多姆也同样是一个不可多得的天才。奥洛沃坎迪也是一个处在上升期的优秀球员,但是球队糟糕的战绩能否留住他可是一个大大的问号。理查德森、马格特、皮亚考斯基、贾里奇都是能够用的上的球员,还有投手的问题,快船糟糕的命中率不是他们缺乏投手造成的,可以信赖的中国球员王治郅在大部分时间里,都被金特里放在了板凳上。他有足够优秀的才能来为快船队出力,但是前提是金特里必须意识到这一点。

<br>    如果让我坦率地讲出我对这支球队目前的印象的话,可能会让金特里有些难受。快船队在进攻的时候热衷于单打独斗,在防守的时候又站位稀松,他们没有一丝一毫地成为金特里所说的“强大球队”的迹象。明白地说如果他们不立刻修补他们自己的窟窿的话,船会沉的。

<br>    如果金特里仍然梦想带领快船跻身季后赛的话,他就必须在剩下的比赛中取得28场以上的胜利。这个目标显然让更多的人相信,他们已经和季后赛说再见了,但是即使如此,对于这支年轻的球队来说,在未来的比赛当中表现出一支季后赛球队应该具备的水准仍然是十分必要的。因为这样他们至少还能拥有尊严。

<br>    在受伤的球员逐渐回归主力阵容之后,快船队在实力上显然已经具备了取得佳绩的条件,在这种情况下,主教练金特里能否正确地运用他的球队就成为了快船队能否前进的关键。

<br>    金特里首先要做的就是改进球队的防守,如果不能够限制住对手的得分,尤其遏制住对手的快攻,快船队要想取得理想的战绩就会变得十分的艰难。此外还有投手的问题,金特里必须解决,那些认为有一两个主力队员回归之后,得分就会大幅度增加的想法过于天真。金特里必须明白有太多的事情需要他去改变,如果他还有欲望去取得胜利。(飞鹰编译)
</p>
 </div>
</div>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值