-1

所以我有一个列表,不知道如何更改它的内容的显示格式,以便 UL 的宽度和高度自动调整到 LI 内容的大小。

我已经更新了小提琴:jsfiddle.net/devin85/tMYxT/7 ...

将第 2 级项目悬停将说明我的问题 - “巴士站”“员工”“围栏”“车辆”

感谢您的帮助。

德文

4

2 回答 2

2

您将子菜单高度限制为 32px;在 CSS 中修复(第 32 行):

#navigation .submenu {
display: none;
position: absolute;
top: 32px;
left: 0px;
background-color: transparent; 
white-space: nowrap;
width: auto;
height: auto;
}
于 2012-09-13T14:20:02.673 回答
1

将此行添加到 CSS 代码的末尾:

#navigation .submenu .submenu { height:auto; }
于 2012-09-13T14:11:14.350 回答