关于Blog中加入flash金鱼的补充.

目前看朋友们在网页上加入flash金鱼的方法,我加了后感觉很漂亮。但发现,如果拉动IE滚动条的话,DIV只能停在指定的位置,所以写了个js来保持永远在页面中间。将下列代码放入->选项->静态新闻组就OK了!

<DIV id=Layer1 style="Z-INDEX: 1; LEFT: 300px; WIDTH: 450px; POSITION: absolute; TOP: 25px; HEIGHT: 350px">
<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 height=400 width=400 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="_cx" VALUE="10583"><PARAM NAME="_cy" VALUE="10583"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="
http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM NAME="Src" VALUE="http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM NAME="WMode" VALUE="Transparent"><PARAM NAME="Play" VALUE="0"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="0"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1">

<embed src="http://www.hrtsea.com/bbs/Images/fish.swf" width="400" height="400" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" wmode="transparent"></embed></OBJECT></DIV>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
lastScrollY=0;
function SuperCenter(){
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.Layer1.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
window.setInterval("SuperCenter()",1);
//  End -->
</script>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值