Superfish CSS:垂直设置子菜单,而不是水平设置(Superfish CSS: Make submenu dropdown vertically instead of horizontally)
我这里有一个超级鱼菜单,我希望子菜单垂直下拉。 我可以通过设置实现这一点
.sf-menu.sf-style-white.sf-navbar li ul { width: 150px; left: 100px; }但是,这不是一个灵活的解决方案,因为它只有在我只有一个具有子菜单的父项时才能工作,我必须根据链接菜单中的位置手动调整它。 我正在寻找一种方法来自动下拉子菜单在其父项下面。
I have a superfish menu here and I would like the submenu to dropdown vertically. I can achieve this by setting
.sf-menu.sf-style-white.sf-navbar li ul { width: 150px; left: 100px; }However, this is not a flexible solution because it will only work if I only have 1 parent-item that has a submenu and I would have to adjust it manually depending on where in the menu the link is. I'm looking for a way to dropdown submenu's below their parent items automatically.
最满意答案
将以下属性添加到您的规则中。 这对你有所帮助。
.sf-menu.sf-style-white.sf-navbar li { position:relative; } .sf-menu.sf-style-white.sf-navbar li ul { left: 0; }Add below properties to your rules. This will help you.
.sf-menu.sf-style-white.sf-navbar li { position:relative; } .sf-menu.sf-style-white.sf-navbar li ul { left: 0; }更多推荐
发布评论