找回密码
 注册加入

扫一扫,极速登录

QQ登录

只需一步,快速开始

搜索
查看: 12337|回复: 4

仿DSU的顶部固定导航条

[复制链接]
发表于 2011-3-14 13:29:48 | 显示全部楼层 |阅读模式
下面是CSS文件
  1. <style>

  2. .top_bar{position:fixed;top:0;background:#FAF5F5;border-bottom:1px solid #CDCDCD;padding:5px 15px; margin-bottom:15px;height:18px;line-height:18px;font-size:12px;width:100%;z-index:80;}.top_bar_right{float:right;padding-right:20px;}
  3. .top_bar .new{background-repeat:no-repeat;padding:0 0 2px 20px;color:red;font-weight:bolder;}
  4. .pipe{margin:0 5px;color:#CCC;}
  5. </style>
复制代码

下面是顶部导航代码,我已经加了调用的代码,大家直接添加在头部就行了具体位置请参照官方:
  1. <div class="top_bar">
  2. <div class="top_bar_right">
  3. <!--{if $_G['uid']}-->
  4.                                 <strong><a href="home.php?mod=space&uid=$_G[uid]" class="vwmy" target="_blank" title="{lang visit_my_space}">{$_G[member][username]}</a></strong>
  5.                                 <!--{if $_G['group']['allowinvisible']}--><span id="loginstatus" class="xg1"><a href="member.php?mod=switchstatus" title="{lang login_switch_invisible_mode}" onClick="ajaxget(this.href, 'loginstatus');doane(event);"><!--{if $_G['session']['invisible']}-->{lang login_invisible_mode}<!--{else}-->{lang login_normal_mode}<!--{/if}--></a></span><!--{/if}-->
  6.                                 <span class="pipe">|</span><span id="usercredit" class="showmenu" onMouseOver="showMenu(this.id);"><a href="http://www.dsu.cc/home-spacecp-ac-credit.html">{lang credits}</a></span>
  7.                                 <span class="pipe">|</span><span id="usersetup" class="xg1 showmenu" onMouseOver="showMenu(this.id);"><a href="home.php?mod=spacecp">{lang setup}</a></span><span class="pipe">|</span>
  8.                 <a href="{if $_G['uid']}home.php{else}javascript:;{/if}" id="qmenu" onMouseOver="showMenu(this.id)">{lang my_center}</a>
  9.                                 <span class="pipe">|</span><a href="home.php?mod=space&do=notice" id="myprompt"{if $_G[member][newprompt]} class="new"{/if}>{lang remind}<!--{if $_G[member][newprompt]}-->($_G[member][newprompt])<!--{/if}--></a><span id="myprompt_check"></span>
  10.                                 <span class="pipe">|</span><a href="home.php?mod=space&do=pm" id="pm_ntc"{if $_G[member][newpm]} class="new"{/if}>{lang pm_center}<!--{if $_G[member][newpm]}-->($_G[member][newpm])<!--{/if}--></a>
  11.                                 <!--{if $_G['group']['allowmanagearticle'] || $_G['group']['allowdiy'] || in_array($_G['uid'], $_G['setting']['ext_portalmanager'])}--><span class="pipe">|</span><a href="portal.php?mod=portalcp">{lang portal_manage}</a><!--{/if}-->
  12.                                 <!--{if $_G['uid'] && $_G['group']['radminid'] > 1}--><span class="pipe">|</span><a href="forum.php?mod=modcp&fid=$_G[fid]" target="_blank">{lang forum_manager}</a><!--{/if}-->
  13.                                 <!--{if $_G['uid'] && ($_G['group']['radminid'] == 1 || $_G['member']['allowadmincp'])}--><span class="pipe">|</span><a href="admin.php" target="_blank">{lang admincp}</a><!--{/if}-->
  14.                                 <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>
  15.                         <!--{elseif !empty($_G['cookie']['loginuser'])}-->
  16.                                 <strong><a id="loginuser">$_G['cookie']['loginuser']</a></strong>
  17.                                 <span class="pipe">|</span><a href="member.php?mod=logging&action=login" onClick="showWindow('login', this.href);hideWindow('register');">{lang activation}</a>
  18.                                 <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>
  19.                         <!--{else}-->
  20.                                 <a href="member.php?mod={$_G[setting][regname]}" onClick="showWindow('register', this.href);hideWindow('login');">$_G['setting']['reglinkname']</a>
  21.                                 <span class="pipe">|</span><a href="member.php?mod=logging&action=login" onClick="showWindow('login', this.href);hideWindow('register');">{lang login}</a>
  22.                         <!--{/if}-->
  23. </div>
  24. <div class="top_bar_left">
  25. <a href="#">论坛首页</a><span class="pipe">|</span>
  26. <a href="#">商业源码</a><span class="pipe">|</span>
  27. <a href="#">PSD素材</a><span class="pipe">|</span>
  28. <a href="#">插件下载</a><span class="pipe">|</span>
  29. <a href="#">模板风格</a><span class="pipe">|</span>
  30. <a href="#">网页代码</a><span class="pipe">|</span>
  31. <a href="#" id="new_plugin" onMouseOver="showMenu(this.id)" class="showmenu">最近更新插件</a><span class="pipe">|</span>


  32.         </div>
  33.     </div>
  34.     <div id="usercredit_menu" class="p_pop" style="display: none; zoom: 1;width:110px;">
  35.             <ul><!--{eval $upgradecredit = $_G['uid'] && $_G['group']['grouptype'] == 'member' && $_G['group']['groupcreditslower'] != 999999999 ? $_G['group']['groupcreditslower'] - $_G['member']['credits'] : false;}-->
  36.                                         <li> <a href="home.php?mod=spacecp&ac=credit">{lang credits}: $_G[member][credits]</a><!--{loop $_G['setting']['extcredits'] $extcreditid $extcredit}--><!--{if empty($extcredit['hiddeninheader'])}--> </li> <li><a href="home.php?mod=spacecp&ac=credit" id="hcredit_$extcreditid">{$extcredit[img]}$extcredit[title]: <!--{echo getuserprofile('extcredits'.$extcreditid);}--></a> {$extcredit[unit]}<!--{/if}--><!--{/loop}--> </li> <li> <a href="home.php?mod=spacecp&ac=usergroup"{if $upgradecredit !== 'false'} id="g_upmine" class="xi2" onMouseOver="showMenu({'ctrlid':this.id, 'pos':'21'});"{/if}>{lang usergroup}:  $_G[group][grouptitle]</a></li>

  37. </div>
  38. <div id="new_plugin_menu" class="p_pop" style="display: none; zoom: 1;">
  39. <ul><li><a href="http://www.dsu.cc/thread-29576-1-1.html">快捷回复 1.5</a></li>
  40. <li><a href="http://www.dsu.cc/thread-35703-1-1.html">打卡机(签到简洁版) 2.3</a></li>
  41. <li><a href="http://www.dsu.cc/thread-27298-1-1.html">每日签到 3.0</a></li>
  42. </ul>
  43. </div>
复制代码

发表于 2011-3-30 14:09:56 | 显示全部楼层
有演示图没有?
回复 支持 反对

使用道具 举报

发表于 2011-3-30 17:17:23 | 显示全部楼层
我昨天在群里发了图的.....对于2.0来说还是不要那个固定的导航条好点
回复 支持 反对

使用道具 举报

发表于 2011-5-30 07:24:43 | 显示全部楼层
到底是2.0好 还是1.5好呢  我都在纠结升不升级
回复 支持 反对

使用道具 举报

发表于 2011-6-16 08:28:41 | 显示全部楼层
学习了 顶顶更健康
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册加入  

本版积分规则

Archiver|手机版|小黑屋|Discuz!扩展中心 ( 浙ICP备14042422号-1 )|网站地图QQ机器人

GMT+8, 2024-4-29 12:03 , Processed in 0.157702 second(s), 15 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表