* { padding:0; margin:0; list-style:none; } .all { width:330px; height:30px; margin:100px auto; background-color:#235EA4; padding-left:10px; } .all li { width:100px; height:30px; background-color:#235EA4; line-height:30px; text-align:center; float:left; margin-right:10px; display:inline; position:relative; cursor:pointer; } .all ul { position:absolute; left:0; top:30px; display:none; }
最简单编写下拉菜单。使用排他思想去实现。简单,快捷!