SCLUB免費論壇申請-使用者論壇's Archiver

leots 發表於 2012-7-12 16:33

[教學 ]返回顶部加强版及释义For Leots

[i=s] 本帖最後由 bossll 於 2012-11-28 18:10 編輯 [/i]

在后台修改模板forumdisplay和index_header,在适当位置添加[code]<div id="shangxia"><div id="shang"></div><div id="xia"></div></div>[/code]修改模板viewthread,在适当位置添加[code]<div id="shangxia"><div id="shang"></div><div id="comt"></div><div id="xia"></div></div>[/code]修改模板css_append ,添加[code]#shangxia{position:fixed;top:40%;left:50%;margin-left:-520px;display:block;}

/* 使用fixed使id=“shangxia”的对象固定于浏览器中,相对的上距离为40%,左距离为50%(即居中),然后向左移动520px(需自行调整!!!) */

#shang{background:url(http://it.gain.tw/attachments/month_1207/12071215354e27e2328bfc204e.png) no-repeat;position:relative;cursor:pointer;height:15px;width:29px;margin:10px 0;}

#xia{background:url(http://it.gain.tw/attachments/month_1207/1207121535b17b8cb0a349e0d7.png) no-repeat;position:relative;cursor:pointer;height:15px;width:29px;margin:10px 0;}

#comt{background:url(http://it.gain.tw/attachments/month_1207/1207121535cfd0a834ded71e5b.png) no-repeat;position:relative;cursor:pointer;height:27px;width:29px;margin:10px 0;}
#shang:hover{background:url(http://it.gain.tw/attachments/month_1207/1207121535b200f367042f36bf.png) no-repeat;}
#xia:hover{background:url(http://it.gain.tw/attachments/month_1207/1207121535c1fa003c6337c8d5.png) no-repeat;}
#comt:hover{background:url(http://it.gain.tw/attachments/month_1207/1207121535f2eca7200cb46803.png) no-repeat;}[/code]后台第三方代码添加:[code]<script>
$jq('#shang').click(function(){$jq('html,body').animate({scrollTop: '0px'}, 800);});

//点击id="shang"对象时,滑动至相对浏览器滚动条为0px(即顶部),时间为800毫秒

$jq('#comt').click(function(){$jq('html,body').animate({scrollTop:$jq('.editor_tb').offset().top}, 800);});

//点击id="comt"对象时,滑动至id="comment"相对浏览器滚动条的距离,时间为800毫秒

$jq('#xia').click(function(){$jq('html,body').animate({scrollTop:$jq('#footer').offset().top}, 800);});
</script>[/code]后台其他头部信息添加:[code]<script> document.write('<'+'script src="http://it.gain.tw/attachments/month_1207/120712154117c1385272031a4c.attach"></script'+'>') </script>[/code]原作者林木木[url]http://immmmm.com/added-sliding-effect-enhanced.html[/url]
活生生的例子:[url]http://it.gain.tw/[/url]
顺便说一句,我想找个人一起做个代码站,不知道谁能和我一起做。俗话说一个巴掌拍不响嘛。
邮箱地址:[email]173084705@qq.com[/email]
顺便说一下,我不希望这个东西会在不久后在各个插件站满天飞

章鱼 發表於 2012-7-12 16:52

支持一个
现在SCLUB代码盗版者太多了哎…

0857 發表於 2012-7-12 17:46

謝謝樓主分享。

liangweisee 發表於 2012-11-24 20:02

返回顶部的代码可谓各种各样啊。

4rphotoclub 發表於 2012-11-25 12:07

好東西一定要好好學習

bonimon 發表於 2012-11-25 12:34

这个代码视乎太长了,而且也很复杂。

小枫 發表於 2012-11-30 15:55

好复杂的说……

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.