这样的做法很老了,推荐利用inline-block做在a标签里
ul li{
float:left;
list-style:none;
}
ul li a{
display: inline-block;
width:120px;
line-height:40px;
text-decoration:none;
text-align:center;
color: #0F0F0F;
}
ul li a:hover{
color: #FFFFFF;
background-color: #706565;
}
ul li{
float:left;
list-style:none;
}
ul li a{
display: inline-block;
width:120px;
line-height:40px;
text-decoration:none;
text-align:center;
color: #0F0F0F;
}
ul li a:hover{
color: #FFFFFF;
background-color: #706565;
}
2017-07-02
<script>
$(function(){
$("#menu").children("ul").children("li").mouseover(function(){
$(this).children("ul").show();
});
$(".max").children("ul").children("li").mouseout(function(){
$(this).children("ul").hide();
});
});
</script>
$(function(){
$("#menu").children("ul").children("li").mouseover(function(){
$(this).children("ul").show();
});
$(".max").children("ul").children("li").mouseout(function(){
$(this).children("ul").hide();
});
});
</script>
2017-06-25