html框架左侧导航栏如何实现移动鼠标显示二级菜单
发布网友
发布时间:2022-04-30 00:09
我来回答
共1个回答
热心网友
时间:2022-04-19 06:07
#nav ul { list-style-type:none; }
#nav ul li { float:left; position: relative;}
#nav ul li a { border-right:1px solid #e9e9e9; padding:20px; display:block; text-decoration:none; text-
align:center; color:#999;}
#nav ul li a:hover {background: #12aeef url(http://files.jb51.net/demoimg/200912/shadow.png) repeat-x;;
color:#fff;}
#nav ul li ul {display: none;}
#nav ul li:hover ul {display: block; position: absolute; top:56px; min-width:190px; left:0;}
#nav ul li:hover ul li a {display:block; background:#12aeef; color:#ffffff; width: 110px; text-align:
center; border-bottom: 1px solid #f2f2f2; border-right: none;}
#nav ul li:hover ul li a:hover { background:#6dc7ec; color:#ffffff; }