企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## jquery ~~~ // 导航上拉隐藏下拉显示 $(function(){ var cubuk_seviye = $(document).scrollTop(); var header_yuksekligi = $('.navbar-default').outerHeight(); $(window).scroll(function() { var kaydirma_cubugu = $(document).scrollTop(); if (kaydirma_cubugu > header_yuksekligi){$('.navbar-default').addClass('gizle');} else {$('.navbar-default').removeClass('gizle');} if (kaydirma_cubugu > cubuk_seviye){$('.navbar-default').removeClass('sabit');} else {$('.navbar-default').addClass('sabit');} cubuk_seviye = $(document).scrollTop(); }); }); ~~~ * * * * * ## html ~~~ <!-- 导航 --> <nav class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-navbar-collapse"> <span class="sr-only"> 切换导航 </span> <span class="icon-bar"> </span> <span class="icon-bar"> </span> <span class="icon-bar"> </span> </button> <a class="navbar-brand intop-img" href="{:U('index/index')}"> <img src="__TMPL__Public/image/logo.png" class="img-responsive" alt="Responsive image"/> </a> </div> <div class="collapse navbar-collapse" id="example-navbar-collapse"> <ul class="nav navbar-nav nav-font"> <li> <a href="{:leuu('portal/page/index', array('id'=>14))}"> 关于 </a> </li> <li> <a href="{:leuu('portal/list/index', array('id'=>11))}"> 动态 </a> </li> <li> <a href="{:leuu('portal/list/index', array('id'=>12))}"> 观点 </a> </li> <li> <a href="{:leuu('portal/page/index', array('id'=>22))}"> 联络 </a> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> 案例 + <!-- <i class="fa fa-plus"></i> --> </a> <ul class="dropdown-menu"> <li> <a href="{:leuu('portal/list/index', array('id'=>3))}"> <span class="en">Brand</span> <span class="cn">品牌形象</span> </a> </li> <li> <a href="{:leuu('portal/list/index', array('id'=>4))}"> <span class="en">Package</span> <span class="cn">包装</span> </a> </li> <li> <a href="{:leuu('portal/list/index', array('id'=>5))}"> <span class="en">Promotion</span> <span class="cn">画册&印刷品</span> </a> </li> <li> <a href="{:leuu('portal/list/index', array('id'=>6))}"> <span class="en">Print</span> <span class="cn">活动&推广</span> </a> </li> <li> <a href="{:leuu('portal/list/index', array('id'=>7))}"> <span class="en">Website</span> <span class="cn">网站</span> </a> </li> <li> <a href="{:leuu('portal/list/index', array('id'=>8))}"> <span class="en">Other</span> <span class="cn">其他</span> </a> </li> </ul> </li> </ul> </div> </nav> ~~~