#nav { height:80px; background-color:rgb(77,128,175); } #nav * { margin:0; padding:0; } #nav a { text-decoration:none; font-size:12px; } /*一级菜单*/ #nav ul { margin:0 auto; width:1140px; display:block; list-style-type:none; } #nav ul li { display:block; width:120px; height:80px; line-height:80px; float:left; text-align:center; border-right:solid 1px black; } #nav ul li a { color:#fff; } #nav ul li:last-child { border-right:none; } #nav ul li:hover { background:#46d8ad; } /*二级菜单*/ #nav ul li ul { display:none; } #nav ul li ul li { width:180px; height:25px; line-height:25px; background-color:#31363c; border:solid 0px #808080; text-align:left; } #nav ul li ul li a { color:#bac6bf; } #nav ul li:hover ul { display:block; position:relative; width:180px; } #nav ul li ul li:hover { background:#31363c; } #nav ul li ul li:hover a:hover { color:#46d8ad !important; } /*三级菜单*/ #nav ul li:hover ul li ul { display:none; } #nav ul li:hover ul li:hover ul { display:block; position:relative; left:180px; top:-25px; } #nav ul li:hover ul li:hover ul li { width:160px; height:25px; line-height:25px; } #nav ul li:hover ul li:hover ul li:hover { background:#31363c; }
更新时间:2020-08-16 22:43:54
三级下拉菜单,亲测可用