一直漂浮顶部的滚动背单词

楼主
一直漂浮顶部的滚动背单词
[color=#0000ff]演示地址已取消,因不美观,我已改成了漂浮顶部的公告[/color]
  我对asp很不熟,自己不会编,一直想做滚动背单词,来这里找到个“涯遇学子”背单词,谁知核心程序是php,我的空间只支持asp。
  后来传到支持php的51.net上,在board_popfun.asp里用iframe跨站调用。
  开始想做成在公告栏(收件箱左边)横向滚动,试过不行,而且一旦用户滚动窗口就看不见单词了。
  于是加到网页最顶,这样一来,[b]不论用户在哪个版面、窗口滚动到何处,顶端一直显示单词,并且只占用一行[/b]。不然的话,用户根本不会注意到单词,效果不好。

  我的修改方法:
  1。在leadbbs.com找到[color=#ff0000]滚动单词插件([url=http://www.leadbbs.com/a/a.asp?B=10&ID=963742]涯遇学子做的插件[/url])[/color]
  2。上传插件,空间必须支持php
  3。修改board_popfun.asp
  
找到      </BODY>
     </HTML><%

End Sub

在</body>前加入
<iframe id=KBStatic  align=center style=position:absolute width=100% height=14 border=0 frameborder=0 framespacing=0 marginheight=0 marginwidth=0 name=engword noResize scrolling=no  vspale=0 src=[color=#ff0000]http://chaoliu.51.net/eng/index.php[/color]></iframe>
<script language=JavaScript>
function KB_keepItInIE(theName,theWantTop,theWantLeft) {
theRealTop=parseInt(document.body.scrollTop)
theTrueTop=theWantTop+theRealTop
document.all[theName].style.top=theTrueTop
theRealLeft=parseInt(document.body.scrollLeft)
theTrueLeft=theWantLeft+theRealLeft
document.all[theName].style.left=theTrueLeft
}
function KB_keepItInNN(theName,theWantX,theWantY) {
theRealLay=document.layers[theName]
theBadX=self.pageYOffset
theBadY=self.pageXOffset
theRealX=theBadX+theWantX
theRealY=theBadY+theWantY
theRealLay.moveTo(theRealY,theRealX)
}
IE4=(document.all)?1:0
NN4=(document.layers)?1:0
if (IE4)
setInterval('KB_keepItInIE("KBStatic",0,0)',1)
if (NN4)
setInterval('KB_keepItInNN("KBStatic",0,0)',1)
</script>

中间的网址要换成背单词插件的地址。

[url=http://chao6.com][color=#0000ff]演示地址![/color][/url]
1楼
  5.1过后论坛换了空间,之前是用51.net的cgi空间,论坛是leobbs程序。换空间用了我一周时间。
  数据库先转到dvbbs,发现好多错误,当天又转换到leadbbs,结果用户积分和等级全部丢失、帖子都归并到一个版面、所有用户密码出错不能登入、所有帖子排版混乱,换行丢失。同时人气大受影响。
  这些天一直在手工修改等级积分(用了excel)、移动帖子、修改排版、修改密码,安装插件、美化论坛。
2楼
补充一下,因为iframe绝对定位,窗口滚动到最上方会看到单词条压住了网页顶部导航,所以应该在网页顶端加上br标识让整个BBS下移一行就可以了。
方法:
在board_popfan.asp中找到
Sub BBS_SiteHead(headString,BoardID,Str)
      SiteHead(headString)
      DisplayBBSNavigate BoardID,Str
End Sub
改成
Sub BBS_SiteHead(headString,BoardID,Str)       
   [color=#ff0000]Response.write("<br>")[/color]
      SiteHead(headString)     
      DisplayBBSNavigate BoardID,Str
End Sub

3楼
不错
要是能够居中就好了!
4楼
不能居中?
我这是800*600无此问题,下午我再研究一下,即使这样,背单词还是被人遗忘了。
5楼
是的
1024下的不是居中的!

电脑版 Page created in 0.0781 seconds with 4 queries.