这个相信大家都喜欢,都来看看,效果如本博右边栏所示
具体添加方法:
1.修改 comomn.js 在最底下加入
//*相关信息 选项卡标签*/
function showDiv(sobj,num){
for(var id = 1;id<=4;id++){
var ss = sobj + id;
var nss = sobj + "nav" + id;
if(id==num){
try{$(ss).style.display="block"}catch(e){};
try{$(nss).className="active"}catch(e){};
}else{
try{$(ss).style.display="none"}catch(e){};
try{$(nss).className=""}catch(e){};
}
}
}
然后在后台建立模块
<div class=""endTag"">
<ul>
<li id=""leftnav1"">
<h2><a onmouseover=""javascript:showDiv('left',1);"" href=""javascript:showDiv('left',1);"" target=""_self"">热 门</a></h2>
</li>
<li id=""leftnav2"" class=""active"">
<h2><a onmouseover=""javascript:showDiv('left',2);"" href=""javascript:showDiv('left',2);"" target=""_self"">日 志</a></h2>
</li>
<li id=""leftnav3"">
<h2><a onmouseover=""javascript:showDiv('left',3);"" href=""javascript:showDiv('left',3);"" target=""_self"">评 论</a></h2>
</li>
<li id=""leftnav4"">
<h2><a onmouseover=""javascript:showDiv('left',4);"" href=""javascript:showDiv('left',4);"" target=""_self"">留 言</a></h2>
</li>
</ul>
</div>
<div class=""endContent"">
<div id=""left1"" style=""display:none;""><$HotLog$></div>
<div id=""left2"" style=""display:block;""><$NewLog$></div>
<div id=""left3"" style=""display:none;"">$comment_code$</div>
<div id=""left4"" style=""display:none;""><$NewMsg$></div>
</div>
然后在皮肤下的layout.css
加入
/* 选项卡关键属性 */
.endTag{clear:both; height:26px; background:url(end_n_bg3.gif) bottom repeat-x; margin:0 auto; }
.endTag .text{float:left;background:url(end_n_i6.gif) 0 7px no-repeat; padding:4px 8px 0 18px; text-align:left;}
.endTag ul{ float:left;list-style:none;}
.endTag li{float:left; margin:0 3px 0 0; border:1px solid #ccc; border-bottom:0; height:24px; background:#fff;overflow:hidden;}
.endTag .active{ height:25px;}
.endTag h2{padding:4px 10px 0 10px; clear:both;}
.endTag a{color:#000;font-size:12px;}
.endTag a:visited{color:#000;}
.endTag a:hover{color:#bc2931;}
.endTag .text a{color:#1f3a87;}
.endTag .text a:hover{color:#bc2931;}
.endContent {margin-top:6px;margin-left:10px;height:auto;}
.Content-body .endContent {height:90px;}
.Pcontent .endContent {margin-left:0;}
.Pcontent .endTag {margin-top:15px;}
.Content-body .endContent ul{margin-left:20px;}
.Content-body .endContent li{list-style-type: disc;}