代码部分:
{if $r[arrchildid]} <!–是否有子栏目–> {pc:content action=”category” catid=”$r[catid]” num=”10″ siteid=”$siteid” order=”listorder ASC” return=”data2″} {loop $data2 $v}<!–子栏目循环开始–> <a href=”{$v[url]}” class=”drop-nav”><span class=”drop-nav-child”>{$v[catname]}</span></a> {/loop}<!–子栏目循环结束–> {/pc} {/if}
CSS:
.drop-nav span{ border-top: 1px solid #A9B7C5; } .drop-nav-child{ display: block; width: 90px; height: 38px; padding-top: 8px!important; margin: auto; background-color: #fff; } .drop-nav { display: none!important; padding: 0px 0px!important; } li:hover .drop-nav{ display: block!important; }
总结:主要实现调用二级菜单栏,以及鼠标经过显示功能;