迅睿cms導航菜單如何高亮顯示當前所在欄目
時間:2022-05-31 | 來源:士人網(wǎng)絡 | 關(guān)注: 414 次
迅睿cms導航菜單或二級菜單如何高亮顯示當前所在欄目呢?只需要加入以下一段代碼即可。
{if IS_SHARE && $catid && in_array($catid, $t.catids)} class="on"{/if}
然后在css樣式列表中設置class類on的樣式為高亮。代碼舉例:
1、調(diào)用標簽代碼
{category module=share pid=16} <li {if IS_SHARE && $catid && in_array($catid, $t.catids)} class="on"{/if}><a href="{$t.url}">{$t.name}</a></li> {/category}
2、css樣式代碼
li.on a{color:#fff;background:#f00;}
相關(guān)熱詞搜索: 迅睿cms,導航菜單,高亮顯示,當前欄目