`算ぺ子ミ 发表于 2011-2-24 23:33:40

DiscuzX1.5 大秀场(有切换功能)

带切换功能,CSS中的图片为网络图片,请自行下载调试。

步骤1:
打开viewthread.htm文件,搜索以下代码

<div id="pt" class="bm cl">
<!--{subtemplate common/simplesearchform}-->
<div class="z">
<a href="./" id="fjump"{if $_G['setting']['forumjump'] == 1}{/if} class="nvhm" title="{lang homepage}">$_G
</a>$navigation <em>›</em> $_G
</div>
</div>步骤2:

在此代码下加入以下代码
<script type="text/javascript">
function switch_daxiuchang(show) {
$('threadadd_show').className = 'show_version ' + show;
$('show_am_span').className = $('show_pm_span').className = '';
$(show + '_span').className = 'threadadd_active';
}
var dxc_show = 'show_am';
function switch_daxiuchang_auto() {
switch_daxiuchang(dxc_show);
dxc_show = dxc_show == 'show_am' ? 'show_pm' : 'show_am';
}
dsc_st = setInterval(switch_daxiuchang_auto, 5000);
</script>

<div style="width: 960px;background: #FFFFFF;margin: 0 auto;">
<div class="threadadd show showvision">

<h3>大秀场</h3>
<dl class="threadadd_main">
<dt id="show_tab" class="changegroup">
<span id="show_am_span" class="threadadd_active">
<a rel="show_am" title="查看大亚湾网友相册" href="javascript:;" onclick="switch_daxiuchang('show_am');">看照片</a>
</span>
<span id="show_pm_span">
<a rel="show_pm" title="查看大亚湾网友摄影" href="javascript:;" onclick="switch_daxiuchang('show_pm');">看风景</a>
</span>
</dt>
<dd id="threadadd_show" class="show_version show_am" onmouseover="clearInterval(dsc_st);" onmouseout="dsc_st = setInterval(switch_daxiuchang_auto, 5000);">
<ul class="show_am"><!----><div id="diy20" class="area"></div><!----></ul>
<ul class="show_pm"><!----><div id="diy21" class="area"></div><!----></ul>
</dd>
</dl>

</div>
</div>步骤3:

往CSS文件里加入以下CSS值

.showvision {height:130px;}
.show {margin-bottom:10px;overflow:hidden;}
.threadadd {background:none repeat scroll 0 0 #EBF2D7;font:100 12px Simsun,Arial;overflow:hidden;padding:3px;width:955px;}
.show h3 {background-position:-96px 3px;}
.show h4 {background-position:-96px 3px;}
.threadadd h3 {background-image:url("http://www.13800.net/images/13800_net/bg_threaduseroption.png");background-repeat:no-repeat;float:left;height:100px;overflow:hidden;padding

-left:35px;width:0;}
.threadadd h4 {background:transparent url("http://www.13800.net/images/13800_net/bg_threaduseroption.png") no-repeat scroll -160px

0;float:left;height:100px;overflow:hidden;padding-left:35px;width:0;}
.threadadd_main {background:none repeat scroll 0 0 #FFFFFF;float:right;overflow:hidden;position:relative;width:920px;z-index:0;}
.changegroup {height:126px;overflow:hidden;position:absolute;right:2px;top:2px;width:24px;
z-index:1;}
.changegroup span {float:left;margin-bottom:2px;overflow:hidden;padding-left:4px;width:20px;}
.changegroup .threadadd_active {background:url("http://www.13800.net/images/13800_net/bg_threaduseroption.png") no-repeat scroll -134px 0 transparent;}
.changegroup span {float:left;margin-bottom:2px;overflow:hidden;padding-left:4px;width:20px;}
.changegroup a, .changegroup a:visited, .changegroup a:hover {color:#334F67;text-decoration:none;}
.changegroup a {background:none repeat scroll 0 0 #EFEFEF;display:block;height:51px;overflow:hidden;padding:11px 4px 0;width:12px;}
.threadadd_main a, .threadadd_main a:visited {color:#666666;}
.threadadd_active a, .threadadd_active a:visited {background:none repeat scroll 0 0 transparent;color:#8FA624;}
.changegroup a, .changegroup a:visited, .changegroup a:hover {color:#334F67;text-decoration:none;}
.changegroup a {background:none repeat scroll 0 0 #EFEFEF;display:block;height:51px;overflow:hidden;padding:11px 4px 0;width:12px;}
.threadadd_main a, .threadadd_main a:visited {color:#666666;}
#threadadd_show {text-align:left;}
.show_version {height:122px;overflow:hidden;padding:6px 20px 2px 2px;position:relative;z-index:0;}
.show_am .show_pm, .show_pm .show_am, .gossip_am .gossip_pm, .gossip_pm .gossip_am {visibility:hidden;}
.show_am .show_am, .show_pm .show_pm, .gossip_am .gossip_am, .gossip_pm .gossip_pm {visibility:visible;}
.show_version ul {height:123px;overflow:hidden;position:absolute;width:900px;}
效果演示:


xianyunan 发表于 2011-3-17 00:14:18

楼主,我太崇拜你了!
圈否社区,我的最爱!
页: [1]
查看完整版本: DiscuzX1.5 大秀场(有切换功能)