迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費且不限制商業(yè)使用,是免費開源的產(chǎn)品,以萬端互聯(lián)為設計理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
模板標簽里面
首頁導航欄,如果在頂級欄目下沒有二級欄目就不增加class樣式,以及結尾的|隔條
<li class="dropdown">
模板代碼:
模板代碼.txt
生成后代碼:
生成后代碼.txt
CSS代碼:
CSS代碼.txt
下面是
li_07.jpg
https://file.xunruicms.com/gwbbs/ueditor/image/202201/16414737306204f4.jpg
需要達到的效果是
<div class="nav"> <div class="container"> <ul> <li{if $indexc} class="active"{/if}> <a href="{SITE_URL}" title="{SITE_NAME}">首頁</a> </li> {category module=share pid=0} <li class="{if $t.child}dropdown{/if}{if IS_SHARE && $catid && dr_in_array($catid, $t.catids)} active{/if}"{if $is_last} style="background-image:none;"{/if}> {if $t.child}<i class="arr"></i>{/if} <a href="{$t.url}" title="{$t.name}"{if $t.tid==2} target="_blank"{/if}>{$t.name}</a> {if $t.child} <div class="dropdown-box"> {category module=share pid=$t.id return=t2} <p><a href="{$t2.url}" class="nav-link nav-toggle" title="{$t2.name}">{$t2.name}</a></p> {/category} </div> {/if} </li> {/category} </ul> </div> </div>