css
<style>
body{
margin: 0;
padding: 0;
}
*{
margin: 0;
padding: 0;
}
#nav{
height: 35px;
width: 100%;
background: #999;
}
ul{
width: 600px;
list-style: none;
margin: auto;
}
.menu{
position: relative;
float: left;
width: 100px;
line-height: 35px;
height: 35px;
text-align: center;
}
.subMenu{
display: none;
border: 1px solid #ccc;
}
.last{
border-bottom: 0;
}
a{
color: #000;
text-decoration: none;
}
</style>
js
<script>
window.onload = function(){
var menu = docu