abstract:三级下拉菜单 *{margin: 0px;padding: 0px;}
.menu { width: 800px;height: 35px;margin: 0px auto;background: #000; margin-top: 20px;color: #fff; border:1px solid #ccc;border-radius: 5px; }
ul{ list-style: none;}
ul li {width: 100px;height: 35px;line-height: 35px;text-align: center;float: left;border-right: 1px solid #ccc;cursor: pointer;}
.twobox li {width: 100px;height: 30px;line-height: 30px;background: #2D2D2D;color: #A9A9A9; font-size: 14px;position: relative;border:0px;}
.twobox li:hover {background: #000;color: #fff;}
.three {position: absolute; top: 0px;left: 100px;}
.three li {width: 99px;height: 30px;line-height: 30px;border: 0;}
$(document).ready(function(){
//隐藏二级与三级下拉菜单
$('.twobox').hide()
$('.three').hide()
//当鼠标移动到包含二级菜单的一级菜单时显示当前二级菜单
$('.one>li').mouseover(function(){
$(this).find('.twobox').slideDown(500)
})
//当鼠标移出包含二级菜单的一级菜单时隐藏当前二级菜单
$('.one>li').mouseleave(function(){
$(this).find('.twobox').slideUp(500)
})
//当鼠标移动到包含三级菜单的二级菜单时显示当前三级菜单
$('.two').mouseover(function(){
$(this).find('.three').slideDown(500)
})
//当鼠标移出包含三级菜单的二级菜单时隐藏当前三级菜单
$('.two').mouseleave(function(){
$(this).find('.three').slideUp(500)
})
})
Correcting teacher:灭绝师太Correction time:2019-01-16 15:36:15
Teacher's summary:难道非要我把你的作业打回去,你才会发现问题么?这样看视频意义何在?学到东西了么?就不说你的作业有没有按时按量完成,你这样也太敷衍了吧?你的每一个作业老师都有认真看,也提示很多次作业不符合标准,怕耽误你进度,所以一直比较宽松,你这不是在浪费我感情么??