博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
phpcms导航栏多个栏目调用
阅读量:6863 次
发布时间:2019-06-26

本文共 1899 字,大约阅读时间需要 6 分钟。

做网站时用的到的简单的栏目导航()

phpcms多个栏目catid in(9,10,11)可以修改id

排序order by listorder ASC/DESC

{if}...{/if}为判断点击为栏目

下面是一种例子

html:

    {pc:get sql="select * from v9_category where catid in(9,10,17,11,12,13,14,15) order by listorder ASC" siteid="$siteid" return="data"} {loop $data $r}
    {/loop}{/pc}

css:

.navb{
float: left; height: 38px; line-height: 38px; margin-top: 4px; width: 99px;}.nabout{
color:#fff; font-size:14px; display:inline-block; width:99px; text-align:center; text-decoration:none; height:38px;line-height:38px; font-weight:bold; }.nabout:hover{
width:99px; color:#067300; background:url(navb.jpg) repeat-x; display:inline-block; height:45px;line-height:38px; text-decoration:none; margin:0px; font-weight:bold;}.nhome{
width:99px; color:#fff; /*background:url(navb.jpg) repeat-x;*/ display:inline-block; height:45px;line-height:38px; margin:0px; text-decoration:none; font-size:14px;font-weight:bold; }.nhome:hover{
text-decoration:none; display:inline-block; width:99px; color:#067300; font-size:14px; background:url(navb.jpg) repeat-x; height:45px; line-height:38px;font-weight:bold; }.hover{
width:99px; color:#067300; background:url(navb.jpg) repeat-x; display:inline-block; height:45px;line-height:38px; text-decoration:none; margin:0px; font-weight:bold; font-size:14px;} .hover:hover{
text-decoration:none; display:inline-block; width:99px; color:#067300; font-size:14px; background:url(navb.jpg) repeat-x; height:45px; line-height:38px;font-weight:bold; }

效果:

转载于:https://www.cnblogs.com/chervehong/p/10373277.html

你可能感兴趣的文章
RAID-10 阵列的创建(软)
查看>>
小白学爬虫-批量部署Splash负载集群
查看>>
dubbo源码分析-服务端发布流程-笔记
查看>>
小菜鸡进阶之路-First week
查看>>
linux 安装 node
查看>>
“不劳而获”的数字货币真的存在么?
查看>>
k8s拾遗 - Secret
查看>>
Android SparseArray 原理解析
查看>>
PHP类的定义
查看>>
Composer 中国镜像地址配置
查看>>
rip等价负载均衡
查看>>
Spring Data JPA
查看>>
LeetCode - Count Primes
查看>>
easyUI的简单之处
查看>>
蓝牙协议学习---BLE地址类型
查看>>
Sass笔记
查看>>
下拉菜单
查看>>
knockout.js 练习一
查看>>
Asp.Net Core SignalR 与微信小程序交互笔记
查看>>
os.linesep提取当前平台使用的换行符
查看>>