织梦导航栏当前栏目高亮

来源:互联网 发布:哈尔滨工程大学网络 编辑:程序博客网 时间:2024/06/04 20:10

1、调用方法,首页也可以

<!--导航栏-->    <div class="channel">    <ul>            <!--<li><a href='{dede:global.cfg_cmsurl/}/'><span>主页</span></a></li>-->            <li {dede:field name=typeid runphp="yes"}(@me=="")? @me=" class='hover'":@me="";{/dede:field}><a href="/">首页</a></li>            {dede:channel type='top' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"}            <li><a href='[field:typeurl/]' [field:rel/]><span>[field:typename/]</span></a></li>      {/dede:channel}    </ul>    </div><!--/导航栏-->

2、样式表

.channel .hover a {    border-bottom:2px solid #1261AF;    color:#1261AF;}