主题 : 官方网站首页主菜单切换时菜单的高亮样式是怎么改变的? |
级别: 贡士
|
1# 发表于:2010-05-20 14:44:06 IP:222.35.*.*
|
||||
---|---|---|---|---|---|
级别: 贡士
|
2# 发表于:2010-05-20 14:45:42 IP:222.35.*.*
级别: 版主 korven 曾回答是:
栏目都是有特定栏目id的,在css中定义各种栏目id对应的样式,然后栏目页模板中用 channel_${chnl.id} {...............}自动匹配即可 但是我还是不太明白怎么用,能不能再具体点,谢谢了(: |
||
---|---|---|---|
级别: 贡士
|
3# 发表于:2010-05-20 14:47:36 IP:222.35.*.*
<ul>
<li class="thisclass"><a href="${base}/">首 页</a> </li> [@cms.ChnlList id='' inner='1';c]<li class="thisclass"><a href="${c.url}">${c.name}</a></li>[/@cms.ChnlList] <li class="thisclass"><a target="_blank" href="${base}/down/index.htm">下载中心</a></li> <li class="thisclass"><a target="_blank" href="${base}/jeecms/topic.jspx">专题</a></li> <li class="thisclass"><a target="_blank" href="${base}/jeecms/Guestbook.jspx">留言板</a></li> </ul> css样式: /*导航栏布局Begin*/ .topmenu {background: url(../img/topmenu_bg.gif) #d10e00 repeat-x left top; height: 35px;} .cbody1 {margin: 0px auto; width: 966px; background-color: #ffffff;} .topmenu ul {font-weight: bold; margin: 0px auto; overflow: hidden; width: 100%; height: 35px;} .topmenu ul li {background: url(../img/topmenu_bg.gif) no-repeat left bottom; float: left; margin-left: -2px; text-align: center;} .topmenu ul li a {padding-right: 12px; display: block; PADDING-LEFT: 14px; float: left; color: #ffffff; line-height: 37px; height: 35px; text-decoration:none;} .topmenu ul li a:hover {background: url(../img/topmenu_o.gif) no-repeat center bottom; color: #cccccc; text-decoration:none;} .topmenu ul li a.thisclass {background: url(../img/topmenu_o.gif) no-repeat center bottom; color: #ffff00;} /*导航栏布局End*/ |
||
---|---|---|---|
级别: 贡士
|
4# 发表于:2010-05-20 15:21:11 IP:222.35.*.*
明白了,终于明白了.
在栏目页模板中 加入这个样式就对了 .menu2 ul li a.thisclass_channel_${chnl.id}{background: url(http://www.jeecms.com/res_base/jeecms_com_www/default/article/img/nav_h.jpg) no-repeat center; color: #ffff00;} |
||
---|---|---|---|
1
共1页