body,div,ul,a { margin:0; padding:0; } ul { list-style:none; } a { text-decoration:none; color:black; } /* 具体样式 */ .mean_aside { width:90px; margin-top:5px; margin-left:15px; background-color:#ccc; } .mean_aside ul li { position:relative; width:90px; height:30px; line-height:30px; } .mean_aside ul li a { display:block; height:30px; line-height:30px; text-align:center; } .mean_aside ul li ul { display:none; } .mean_aside ul li:hover { background-color:#008fc3; } .mean_aside ul li:hover ul { display:block; position:absolute; left:90px; background-color:#008fc3; width:100px; } .mean_aside ul li:nth-child(2) ul { top:-30px; } .mean_aside ul li:nth-child(3) ul { top:-60px; } .mean_aside ul li:nth-child(4) ul { top:-90px; } .mean_aside ul li ul li:hover a { color:#f3d; }
更新时间:2023-05-09 10:27:44
用于垂直导航栏的制作