abstract:三级下拉菜单
body{
margin:0;
}
li{
list-style:none;
}
ul{
padding:0;
}
.menu{
width:600px;
height:44px;
background:#000;
margin:0 auto;
}
a{
text-decoration: none;
color:#fff;
}
.one{
width:120px;
height: 44px;
float: left;
text-align: center;
line-height: 44px;
}
.twomenu{
width:120px;
background:#000;
position: relative;
}
.threemenu{
width:120px;
background:#000;
margin-top:-44px;
position: absolute;
left:120px;
}
li:hover{
background-color: #333;
}
$(document).ready(function(){
$('.twomenu').hide();
$('.threemenu').hide();
$('.one').mouseover(function(){
$(this).find('.twomenu').slideDown(500);
})
$('.one').mouseleave(function(){
$(this).find('.twomenu').slideUp(500);
})
$('.two').mouseover(function(){
$(this).find('.threemenu').slideDown(500);
})
$('.two').mouseleave(function(){
$(this).find('.threemenu').slideUp(500);
})
})
Correcting teacher:天蓬老师Correction time:2019-08-22 15:32:17
Teacher's summary:多级下拉菜单, 通常会配合无限分类来做的