JavaScript案例之多级菜单栏
源码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
ul {
list-style: none;
}
a {
color: #fff;
text-decoration: none;
display: block;
}
#ul1 {
width: 500px;
font-size: 14px;
color: #fff;
line-height: 30px;
text-align: center;
margin: 0 auto;
margin-top: 50px;
}
#ul1 li {
display: inline-block;
float: left;
width: 98px;
height: 30px;
background: #f60;
border: 1px solid #fff;
}
#ul1 li:hover {
background: #666666;
}
#ul