|
阅读:431回复:0
怎样让框内文字上下移动首先,我们在格式表里面加入".opacity {FILTER: alpha(opacity=100)",看下面! <style type="text/css"> <!--.form { font-size: 9pt; color: #ff9900; background-color: #993300; font-family: "宋体"} .opacity {FILTER: alpha(opacity=100) .form { font-size: 9pt; color: #ff9900; background-color: #993300; font-family: "宋体"} .unnamed1 { font-family: "Arial", "Helvetica", "sans-serif"; font-size: 10px} --> </style> 然后在html中加入: <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> 之后在向上箭头图片的代码的加入“class="opacity" onMouseDown=movover();movstar(-3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(-1,20);o_down(this) onMouseUp=movover();movstar(-1,20) alt="点住不放可以快速向上滚动"”看下面! 图片完整代码: <img src="images/new_05.gif" width=19 height=27 class="opacity" onMouseDown=movover();movstar(-3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(-1,20);o_down(this)onMouseUp=movover();movstar(-1,20) alt="点住不放可以快速向上滚动"> 这就是控制文字向上的代码,当鼠标移动到new_05.gif图片上时文字向上移动,按动箭头图标文字加快向上移动速度。 向下箭头图片制作同上。加入“class="opacity" onMouseDown=movover();movstar(3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(1,20);o_down(this) onMouseUp=movover();movstar(1,20) alt="点住不放可以快速向下滚动"”代码。看下面! 图片完整代码: <img src="images/new_07.gif" width=19 height=19 class="opacity" onMouseDown=movover();movstar(3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(1,20);o_down(this) onMouseUp=movover();movstar(1,20) alt="点住不放可以快速向下滚动"> copy一下特殊代码到页面中: <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> 之后在你要显示文字区域加上一下代码: <iframeborder=0 frameborder=0 framespacing=0 height=120 marginheight=0 marginwidth=0 name=new_date noResize scrolling=no src="iframe.htm" width=200 vspale="0"></iframe> 连接一个叫iframe.htm的页面。其中height=120 width=200是控制iframe.htm页面在当前页面的显示大小。 最后编辑iframe.htm文件,放入你要更新的文字就可以了。 -------------------- [fly]我是一只自由的没有方向的小船,我没有期望象鱼儿那样有一天会长大。我漫无目的的漂流着。但是我很快乐![/fly]天!我加了两个翅膀终于飞起来了! |
|
|