* { margin:0; padding:0; list-style:none; } .nav { width:200px; margin:100px auto; } .nav>li { border:1px solid #000; line-height:35px; border-bottom:none; text-indent:15px; /*文字间隔*/ } .nav>li:last-child { border-bottom:1px solid #000; border-bottom-right-radius:5px; border-bottom-left-radius:5px; } .nav>li:first-child { border-top-right-radius:5px; border-top-left-radius:5px; } .sub { display:none; } .sub>li { background:pink; border:1px solid white; } .sub>li:hover { background:#f40; }