此教程会分别用Css/JavaScript/JQuery来实现下拉菜单的样式。如下:
效果图:
以下是CSS样式代码:
<style type="text/css">
*{margin: 0px;padding: 0px;}
#menu{
background-color: #eee;
width: 450px;
height: 40px;
margin: 0px auto;
}
ul{
list-style:none;
}
ul li{
width: 150px;
line-height: 40px;
text-align: center;