基本效果是这样的~~
* { margin: 0; padding: 0; } ul { list-style: none; } .wrap { width: 330px; height: 30px; margin: 100px auto 0; padding-left: 10px; background-color: skyblue; } .wrap li { background-color: skyblue; } .wrap > ul > li { float: left; margin-right: 10px; position: relative; } .wrap a { display: block; height: 30px; width: 100px; text-decoration: none; color: #000; line-height: 30px; text-align: center; } .wrap li ul { position: absolute; top: 30px; display: none; }
- 一级菜单1
- 二级菜单11
- 二级菜单12
- 二级菜单13
- 一级菜单2
- 二级菜单21
- 二级菜单22
- 二级菜单23
- 一级菜单3
- 二级菜单31
- 二级菜单32
- 二级菜单33
以上所述是小编给大家介绍的jQuery实现下拉菜单的实例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对考高分网网站的支持!



