THINKCMF5底部导航调用案例并实现当前页面高亮
<footer id="footer" class="H-footer H-flexbox-horizontal H-theme-background-color-white" style="position:fixed;bottom:0px;"> <div style="position:absolute;float:top; height:1px; width:100%;background-color: #eee"></div> <?php $navMenuModel = new \app\admin\model\NavMenuModel(); //其中参数2表示底部导航 $menus = $navMenuModel->navMenusTreeArray(2,1); foreach($menus as $k=>$v){ ?> <div id="tab<?php echo $k; ?>" class="H-flex-item H-center-all H-text-align-center H-touch-active swipe-item"> <a href="<?php echo $v['href'];if($v['target'])echo ' target="'.$v['target'].'"'; ?>" <?php if($_SERVER['REQUEST_URI'] != '/' && strpos($v['href'],$_SERVER['REQUEST_URI'])!==false){echo 'style="color:#d23c3b"';}else{echo 'style="color:#666"';} ?>> <span class="H-icon H-display-block H-line-height-normal "> <span class="Hui-iconfont Hui-iconfont-leijipingjia H-font-size-22"></span> </span> <strong id="footer1" class="H-font-size-14 H-display-block H-font-weight-normal H-line-height-normal"><?php echo $v['name']; ?></strong> </a> </div> <?php } ?> </footer>
如果本文对你有帮助,欢迎打赏本站