样式:
body{ font:14px "Microsoft YaHei", Arial,Verdana,tahoma, Srial, helvetica, sans-serif; line-height:1.8; color:#333; background:#fff;}.menu {height: 40px; background: #4ba036;position: relative; z-index:999;}.menu a { text-decoration: none;display: block; padding: 0 12px; margin-right: 1px; line-height: 40px; font-size: 16px; color: #fff;}ul { margin: 0; padding: 0;}.menu li { list-style: none; float: left; width: 90px; overflow: visible; cursor: pointer;}ul.level0 { height: 40px; overflow: visible;}ul.level1, ul.level2, ul.level3 { width: 90px; display: none;}ul.level2, ul.level3 { margin: -28px 0 0 90px;}ul.level0 > li { height: 40px; line-height: 40px; text-align: center; background: #4ba036;}ul.level1 > li, ul.level2 > li, ul.level3 > li { height: 40px; line-height: 40px; background: #308a1a;}ul.level0 > li:hover { background: #308a1a;}ul.level1 > li:hover, ul.level2 > li:hover, ul.level3 > li:hover { background: #4ba036;}ul.level0 > li.imyeah:hover > ul, ul.level1 > li.imyeah:hover > ul, ul.level2 > li.imyeah:hover > ul, ul.level3 > li.imyeah:hover > ul { display: block;} |
调用代码:
<div class="menu"> <div class="bar"> <ul class="level0"> <li><a href="/">首页</a></li> {dede:channelartlist typeid="top" row='18' currentstyle="<li class='active'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"} <li class="imyeah"><a href="{dede:field name="typeurl"/}" target="_blank">{dede:field name="typename"/}</a> <ul class="level1"> {dede:channel type="son"} <li><a href="[field:typeurl/]" title="[field:typename/]">[field:typename/]</a></li> {/dede:channel} </ul> </li> {/dede:channelartlist} </ul> </div></div> |
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!
希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 lecms, classcms, fastadmin, pbootcms, phpcms, eyoucms, yzmcms, PHP, xunruicms, jizhicms, dedecms, wordpress, hkcms, yzncms, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。