<ul>
<li><a class="hide" href="index.html">首页</a></li>
<li><a class="hide" href="page.html">关于我们</a>
<ul>
<li><a href="page.html">关于合作建房</a></li>
<li><a href="page.html">企业文化</a></li>
<li><a href="page.html">企业荣誉</a></li>
<li><a href="page.html">核心理念</a></li>
</ul>
</li>
<li><a class="hide" href="#">合作成功密码</a>
<ul>
<li><a href="page.html">合作模式</a></li>
<li><a href="page.html">加入流程</a></li>
<li><a href="#">团购幸福家</a></li>
<!--链接页面待定,先链接到page03.html-->
</ul>
</li>
<li><a class="hide" href="#">案例参考</a>
<ul>
<li><a href="page.html">成功案例</a></li>
<li><a href="page.html">失败案例</a></li>
<li><a href="page.html">国外案例</a></li>
</ul>
</li>
<li><a class="hide" href="#">区域项目简介</a>
<ul>
<li><a href="page02.html">华南(国际)口腔医疗器械城</a></li>
<li><a href="page02.html">华南(国际)医疗器材产业中心</a></li>
<li><a href="page02.html">清远红场大型购物商场</a></li>
<li><a href="page02.html">佛山鸿业幼儿园</a></li>
<li><a href="page02.html">佛山西樵金果广场</a></li>
<li><a href="page02.html">佛山石湾行政服务中心</a></li>
</ul>
</li>
<li><a class="hide" href="reg.html">我要报名</a> </li>
<li><a class="hide" href="news-list.html">法律保障</a> </li>
<li><a class="hide" href="page.html">联系我们</a> </li>
</ul>
<div class="clear"> </div>
</div> .menu {
font-family: arial, sans-serif
width: 1000px
height: 38px
margin-top: 5px
position:relative
z-index:10
}
.menu ul {
padding: 0
margin: 0
list-style-type: none
position:relative
z-index:10
}
.menu ul li {
width: 125px
height: 38px
float: left
position: relative
background: url(../images/index_09.jpg) no-repeat left
position:relative
z-index:10
}
.menu ul li a {
display: block
text-align: center
text-decoration: none
display: block
height: 38px
color: #bfd9eb
line-height: 33px
font-size: 14px
font-weight: bold
position:relative
z-index:10
}
.menu ul li a:visited {
display: block
text-align: center
text-decoration: none
width: 125px
display: block
height: 38px
line-height: 38px
font-size: 14px
font-weight: bold
position:relative
z-index:10
}
.menu ul li ul {
display: none
position:relative
z-index:10
}
.menu ul li:hover a {
color: #000
background: #fff
border: none
position:relative
z-index:10
}
.menu ul li:hover ul {
display: block
position: absolute
top: 35px
left: 0
border-top: none
}
.menu ul li:hover ul li a {
display: block
background: #fff
color: #000
font-size: 12px
font-weight: normal
text-align: left
padding-left: 10px
border: none
}
.menu ul li:hover ul li a:hover {
background: #008fc3
color: #f00
}
HTML:<p class="p">基础</p>
<div class="show">
<ul>
<li><a href="#">aa</a></li>
<li><a href="#">ss</a></li>
<li><a href="#">dd</a></li>
<li><a href="#">ff</a></li>
<li><a href="#">gg</a></li>
</ul>
</div>
css:
.show{
display:none
}
js:
var isClick=true
$(".p").click(function(){
if(isClick){
$(".show").css("display","block")
isClick=false
}else{
$(".show").css("display","none")
isClick=true
}
})
思路,
要显示的内容用一个div包住,当你点击基础的时候,div显示,再点击时div隐藏