ul { list-style:none; overflow:hidden; margin:0; padding:0; } li { float:left; width:80px; height:40px; line-height:40px; text-align:center; background-color:aliceblue; } .ys { background-color:#000; color:#fff; } .nav-box { width:400px; height:300px; background-color:#000; color:#fff; line-height:300px; text-align:center; display:none; }
详细操作写在了jQuery备注了,不明白的可以看备注