ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
原作者:yufan    chm整合-yufan  Q:956932910 个人网站[http://www.phper.kuphp.net/](http://www.phper.kuphp.net/)  论坛推荐[http://bbs.lampym.com/index.php?c=thread&fid=12](http://bbs.lampym.com/index.php?c=thread&fid=12)   <!--导航开始--> <div id="top_bg">  <div class="top">   <a class="logo_l" href="/" title="返回首页"></a>      <div class="nav_z">    <ul id="navul" class="cl">     <li><a href="{SITE_URL}">网站首页</a></li>     {loop $cats $cat}     {if $cat[parentid] == 0 && $cat['ismenu']}     <li>      <a href="{$cat['url']}">{$cat['catname']}</a>      <ul>       {if $cat['child']}       {loop $cats $a}       {if $a[parentid] == $cat[catid]}       <li><a href="{$a['url']}">{$a['catname']}</a></li>       {/if}       {/loop}       {/if}      </ul>            </li>     {/if}     {/loop}    </ul>   </div>   <script  type="text/javascript">   $(".navbg").capacityFixed();   </script>  </div> </div> <!--导航结束-->               css文件   <!-- 导航 --> <style>  #top_bg{height:40px;width:100%;background:#333;box-shadow:1px 1px 7px #999;position:fixed;z-index:999;left:0;border-bottom:#C6C6C6 solid 1px;}  .top{width:1640px;height:40px;margin:0 auto;}  .top .logo_l{width:145px;height:40px;float:left;background:url(../images/logo.png) no-repeat left;}    .nav_z{width:auto!important;height:40px;float:left;position:relative;z-index:999 ;}  #navul li{float:left;width:80px;height:40px;position:relative;text-align:center;line-height:40px;}  #navul li a:link, #navul li a:visited{color:#FFF;font-weight:500;letter-spacing:2px;}  #navul li ul{display:none;position:absolute;z-index:999;background:#e6e6e6;border:#c6c6c6 1px solid;border-bottom:none;left:-1px;}  #navul li ul li{display:block;width:78px;float:none;height:35px;position:relative;line-height:35px;border-bottom:#C6C6C6 1px solid;font-size:12px;overflow:hidden}  #navul li.navmoon{background:#E6E6E6;border:#C6C6C6 1px solid;width:78px;height:38px;line-height:38px;}  #navul li.navmoon a{color:#404a58;}  #navul li.navhome a:hover{color:#FCFF00;}  #navul li.navmoon ul{display:block;}  #navul li.navmoon ul a{display:block;width:78px;height:35px;line-height:35px;}  #navul li.navmoon ul a:hover{color:#0573bd;background:#FFF;} </style> <!-- 导航结束 -->       js代码   /* *author:Null *DATE:2013.5.24 */   $(function(){      //头页登录  $("#navul > li").not(".navhome").hover(function(){   $(this).addClass("navmoon")  },function(){   $(this).removeClass("navmoon")  });   });   (function($){     $.fn.capacityFixed = function(options) {         var opts = $.extend({},$.fn.capacityFixed.deflunt,options);         var FixedFun = function(element) {             var top = opts.top;             element.css({                 "top":top             });             $(window).scroll(function() {                 var scrolls = $(this).scrollTop();                 if (scrolls > top) {                       if (window.XMLHttpRequest) {                         element.css({                             position: "fixed",                             top: 0                                });                     } else {                         element.css({                             top: scrolls                         });                     }                 }else {                     element.css({                         position: "absolute",                         top: top                     });                 }             });             element.find(".close-ico").click(function(event){                 element.remove();                 event.preventDefault();             })         };         return $(this).each(function() {             FixedFun($(this));         });     };     $.fn.capacityFixed.deflunt={   right : 0,//相对于页面宽度的右边定位         top:0  }; })(jQuery);