杭州神话信息技术有限公司
标题:
类似新浪侧边滚动的 常用导航 分享一下,
[打印本页]
作者:
csxiaorui
时间:
2011-6-6 20:07:14
标题:
类似新浪侧边滚动的 常用导航 分享一下,
[attach]2480[/attach][attach]2481[/attach]
此代码 加在 topic_foot.html 的</body>前面就行。
<DIV id=xixi onmouseover=toBig() onmouseout=toSmall()>
<TABLE style="FLOAT: left" border=0 cellSpacing=0 cellPadding=0 width=157>
<TBODY>
<TR>
<TD class=main_head height=39 vAlign=top> </TD></TR>
<TR>
<TD class=info vAlign=top>
<TABLE class=qqtable border=0 cellSpacing=0 cellPadding=0 width=120
align=center>
<TBODY><tr>
<TD height=5></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=tools&code=share"><span>分享到微博</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=show&code=show"><span>微博秀</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=tools&code=qqwb"><span>QQ微博</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=tools&code=imjiqiren"><span>QQ机器人</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=tools&code=sms"><span>短信</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=tools&code=sina"><span>新浪微博</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=settings&code=base"><span>我的资料</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=settings&code=user_medal"><span>我的勋章</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=settings&code=face"><span>我的头像</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=settings&code=secret"><span>修改密码</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=user_tag&code="><span>我的标签</span></A></TD></TR>
<TR><TD height=30 align=middle><A HREF="index.php?mod=settings&code=extcredits"><span>我的积分</span></A></TD></TR>
<TR>
<TD height=5></TD></TR>
</TBODY>
</TABLE>
</TD></TR>
<TR>
<TD class=down_kefu vAlign=top></TD></TR></TBODY></TABLE>
<DIV class=Obtn></DIV></DIV>
<SCRIPT language=javascript>
果果=function (id,_top,_left){
var me=id.charAt?document.getElementById(id):id, d1=document.body, d2=document.documentElement;
d1.style.height=d2.style.height='100%';me.style.top=_top?_top+'px':0;me.style.left=_left+"px";//[(_left>0?'left':'left')]=_left?Math.abs(_left)+'px':0;
me.style.position='absolute';
setInterval(function (){me.style.top=parseInt(me.style.top)+(Math.max(d1.scrollTop,d2.scrollTop)+_top-parseInt(me.style.top))*0.1+'px';},10+parseInt(Math.random()*20));
return arguments.callee;
};
window.onload=function (){
果果
('xixi',100,-152)
}
</SCRIPT>
<SCRIPT language=javascript>
lastScrollY=0;
var InterTime = 1;
var maxWidth=-1;
var minWidth=-152;
var numInter = 8;
var BigInter ;
var SmallInter ;
var o = document.getElementById("xixi");
var i = parseInt(o.style.left);
function Big()
{
if(parseInt(o.style.left)<maxWidth)
{
i = parseInt(o.style.left);
i += numInter;
o.style.left=i+"px";
if(i==maxWidth)
clearInterval(BigInter);
}
}
function toBig()
{
clearInterval(SmallInter);
clearInterval(BigInter);
BigInter = setInterval(Big,InterTime);
}
function Small()
{
if(parseInt(o.style.left)>minWidth)
{
i = parseInt(o.style.left);
i -= numInter;
o.style.left=i+"px";
if(i==minWidth)
clearInterval(SmallInter);
}
}
function toSmall()
{
clearInterval(SmallInter);
clearInterval(BigInter);
SmallInter = setInterval(Small,InterTime);
}
</SCRIPT>
复制代码
算了,把文件另存一下打包给大家。直接传到 templates/default目录下
[attach]2482[/attach]
注意是GBK 的 不是UTF-8
导航自己改成自己想要的。
作者:
iorili
时间:
2011-7-6 10:43:45
感谢楼主分享
欢迎光临 杭州神话信息技术有限公司 (http://www.cenwor.com/)
Powered by Discuz! X2